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


Example 11

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

  SORT FIELDS=(6,3,CH,D)
  OUTFIL FNAMES=SET60,BUILD=(1,60),VLFILL=C' '
  OUTFIL FNAMES=VARFIX,VTOF,BUILD=(5,20,5X,28,20),VLFILL=C'*'

This example illustrates how variable-length records that are too short to contain all OUTFIL BUILD fields can be processed successfully.

The input data set has RECFM=VB and LRECL=80. The records in this data set have lengths that vary from 15 bytes to 75 bytes.

The first OUTFIL statement creates the data set associated with ddname SET60. This data set will have RECFM=VB and LRECL=60. Every record in this data set will have a length of 60. The 1,60 field truncates records longer than 60 bytes to 60 bytes. Because VLFILL=C' ' is specified, the 1,60 field pads records shorter than 60 bytes to 60 bytes using a blank (C' ') as the fill byte.

Note: Without VLFILL=byte, this OUTFIL statement would terminate with an ICE218A message because some of the input records are too short to contain the BUILD field.

The second OUTFIL statement creates the data set associated with ddname VARFIX. This data set will have RECFM=FB and LRECL=45. VTOF changes the variable-length input records to fixed-length output records according to the fields specified by BUILD. VLFILL=C'*' allows short input records to be processed. Each missing byte in an OUTFIL BUILD field is replaced with an asterisk (C'*') fill byte.

Note:
  1. CONVERT can be used instead of VTOF.
  2. VLFILL=C'*' overrides the default of VLFILL=X'40' for VTOF or CONVERT.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014