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: