Example 1

  OPTION COPY
  OUTFIL INCLUDE=(15,6,CH,EQ,C'MSG005'),FNAMES=M005
  OUTFIL INCLUDE=(15,6,CH,EQ,C'MSG022'),FNAMES=M022
  OUTFIL INCLUDE=(15,6,CH,EQ,C'MSG028'),FNAMES=M028
  OUTFIL INCLUDE=(15,6,CH,EQ,C'MSG115'),FNAMES=M115
  OUTFIL SAVE,FNAMES=UNKNOWN
This example illustrates how records can be distributed to different OUTFIL data sets based on criteria you specify:
  • Input records with MSG005 in bytes 15 through 20 will be written to the OUTFIL data set associated with ddname M005.
  • Input records with MSG022 in bytes 15 through 20 will be written to the OUTFIL data set associated with ddname M022.
  • Input records with MSG028 in bytes 15 through 20 will be written to the OUTFIL data set associated with ddname M028.
  • Input records with MSG115 in bytes 15 through 20 will be written to the OUTFIL data set associated with ddname M115.
  • Input records with anything else in bytes 15 through 20 will be written to the OUTFIL data set associated with ddname UNKNOWN