z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example 8

z/OS DFSORT Application Programming Guide
SC23-6878-00

  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

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014