Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 14 z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example illustrates how you can add and subtract days, months and years from date fields. The SORTIN data set has these input records with a C'ccyymmdd'
date field in positions 1-8:
The INREC statement performs three different date field arithmetic operations on the input date field. It adds 50 days, subtracts 7 months and adds 2 years. We use 1,8,Y4T for the input field to match the C'ccyymmdd' input date, and we use TOGREG=Y4T to give us a C'ccyymmdd' output date. The OUTFIL statement adds headings. SORTOUT will have these records:
Note that the '99999999' input value is treated as a special indicator for output. |
Copyright IBM Corporation 1990, 2014
|