Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Example: sorting by date and time

The following example shows a transaction file that has the transaction records sorted by date and time within account number. Trans-Date is a windowed Julian date field.

SD  Transaction-File
    Record Contains 29 Characters
    Data Record is Transaction-Record
01  Transaction-Record.
    05  Trans-Account  PIC 9(8).
    05  Trans-Type     PIC X.
    05  Trans-Date     PIC 9(5) Date Format yyxxx.
    05  Trans-Time     PIC 9(6).
    05  Trans-Amount   PIC 9(7)V99.
. . .
    Sort Transaction-File
         On Ascending Key  Trans-Account
                           Trans-Date
                           Trans-Time
         Using Input-File
         Giving Sorted-File.

COBOL passes the relevant information to DFSORT for it to perform the sort. In addition to the information COBOL always passes to DFSORT, COBOL also passes the following information, which DFSORT also uses:


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)