Writing 2 output from one Sort

2 posts / 0 new
Last post
Anonymous (not verified)
Writing 2 output from one Sort

I would like to write an output file containing a certain sort criteria and would like the remaining records that do not fit the criteria to be written to another dataset. How should that be written?

Offline
Joined: 12/26/2011 - 06:34
Try something

Try something like:

 

Code:

//S1            EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN     DD DSN=...  input file
//OUT1         DD DSN=...    output file1
//OUT2         DD DSN=...    output file2
//SYSIN        DD    *
  OPTION COPY
  OUTFIL FNAMES=OUT1,INCLUDE=(1,1,CH,EQ,C'A') or whatever
  OUTFIL FNAMES=OUT2,SAVE
/*

Log in or register to post comments
Sponsored Listing

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer

Navigation