Example 8
SORT FIELDS=(11,4,CH,D)
OUTREC FIELDS=(1,20,
(5,4,FI,ADD,3,2,FI,ADD,23,2,FI),DIV,+1000,
EDIT=(STTTTTTT),SIGNS=(,-),2X,
9,5,ZD,MIN,16,5,FS,TO=ZD,LENGTH=5,2X,
21,40)
This example illustrates how input records can be reformatted for output to contain the results of arithmetic expressions involving input fields, decimal constants, operators and parentheses.
The reformatted output records look as follows:
- Position
- Contents
- 1-20
- Input positions 1 through 20
- 21-28
- A CH field containing the total of the FI fields from positions 5 through 8, 3 through 4 and 23 through 24, divided by 1000, and edited according to the specified edit pattern.
- 29-30
- EBCDIC blanks
- 31-35
- A ZD field containing the minimum of the ZD field in positions 9 through 13 and the FS field in positions 16 through 20.
- 36-37
- EBCDIC blanks
- 38-77
- Input positions 21-60