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


Example 10

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

 OPTION COPY
 OUTFIL FNAMES=ALL,OUTREC=(C'US ',1,10,C' is in ',11,15,/,
                           C'WW ',1,10,C' is in ',26,20,2/)
 OUTFIL FNAMES=(US,WW),SPLIT,
                       OUTREC=(1,10,C' is in ',11,15,/,
                               1,10,C' is in ',26,20)
This example illustrates how multiple OUTFIL output and blank records can be produced from each OUTFIL input record. The input data set has an LRECL of 50 and contains the following three records:
Finance   San Francisco  Buenos Aires
Research  New York       Amsterdam
Marketing Los Angeles    Mexico City

The first OUTFIL statement creates the data set associated with ddname ALL. This data set will have an LRECL of 40 (the length of the longest output record; the one that includes the 26,20 input field). Each input record will result in two data records followed by two blank records as follows:

ALL data set
US Finance    is in San Francisco
WW Finance    is in Buenos Aires


US Research   is in New York
WW Research   is in Amsterdam


US Marketing  is in Los Angeles
WW Marketing  is in Mexico City

The second OUTFIL statement creates the two data sets associated with ddnames US and WW. These data sets will have an LRECL of 37 (the length of the longest output record; the one that includes the 26,20 input field). Each input record will result in two data records. SPLIT will cause the first data record to be written to the US data set and the second data record to be written to the WW data set. Thus, each input record will create one record in each OUTFIL data set as follows:

US data set
Finance    is in San Francisco
Research   is in New York
Marketing  is in Los Angeles
WW data set
Finance    is in Buenos Aires
Research   is in Amsterdam
Marketing  is in Mexico City

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014