10.07.2015 Views

Enterprise COBOL for z/OS V4.2 Programming Guide

Enterprise COBOL for z/OS V4.2 Programming Guide

Enterprise COBOL for z/OS V4.2 Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Describing the output from sorting or merging . . 217Coding the output procedure . . . . . . . . 218Example: coding the output procedure whenusing DFSORT . . . . . . . . . . . . 218Restrictions on input and output procedures . . . 219Defining sort and merge data sets . . . . . . 219Sorting variable-length records . . . . . . . 220Requesting the sort or merge . . . . . . . . 220Setting sort or merge criteria . . . . . . . 221Example: sorting with input and outputprocedures . . . . . . . . . . . . . 222Choosing alternate collating sequences . . . . 223Sorting on windowed date fields . . . . . . 223Preserving the original sequence of records withequal keys . . . . . . . . . . . . . 224Determining whether the sort or merge wassuccessful . . . . . . . . . . . . . . 224Stopping a sort or merge operation prematurely 225Improving sort per<strong>for</strong>mance with FASTSRT . . . 225FASTSRT requirements <strong>for</strong> JCL . . . . . . 226FASTSRT requirements <strong>for</strong> sort input andoutput files . . . . . . . . . . . . . 226QSAM requirements . . . . . . . . . 227VSAM requirements . . . . . . . . . 227Checking <strong>for</strong> sort errors with NOFASTSRT . . . 227Controlling sort behavior . . . . . . . . . 228Changing DFSORT defaults with controlstatements . . . . . . . . . . . . . 229Default characteristics of the IGZSRTCD dataset . . . . . . . . . . . . . . . 230Allocating storage <strong>for</strong> sort or merge operations 230Allocating space <strong>for</strong> sort files . . . . . . . 231Using checkpoint/restart with DFSORT . . . . 231Sorting under CICS . . . . . . . . . . . 231CICS SORT application restrictions . . . . . 232Chapter 13. Handling errors . . . . . . . . 233Requesting dumps . . . . . . . . . . . 233Handling errors in joining and splitting strings . . 234Handling errors in arithmetic operations . . . . 234Example: checking <strong>for</strong> division by zero . . . . 235Handling errors in input and output operations 235Using the end-of-file condition (AT END) . . . 238Coding ERROR declaratives . . . . . . . 238Using file status keys. . . . . . . . . . 239Example: file status key . . . . . . . . . 240Using VSAM status codes (VSAM files only) 241Example: checking VSAM status codes . . . . 241Coding INVALID KEY phrases . . . . . . 243Example: FILE STATUS and INVALID KEY . . 243Handling errors when calling programs . . . . 244Writing routines <strong>for</strong> handling errors . . . . . . 2444 <strong>Enterprise</strong> <strong>COBOL</strong> <strong>for</strong> z/<strong>OS</strong> <strong>V4.2</strong> <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!