I have a dataset which I need to break into 10 smaller chunks (datasets) based on ID which is unique. The chunks are not supposed to have simillar lenghth. For example ID 1 thru 200 should be in chunk1, ID 201 thru 240 shuld be in chunk2 and etc. I searched a lot and came accrose the following piece of code that didnt work for me
//S1 EXEC PGM=SORT
//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,6,PD,LE,200)
FNAMES=OUT2,INCLUDE=(1,6,ch,LE,250)
Please help me...
Soraya,
Use the following DFSORT JCL which shows how to split the input file into multiple output files.
The output for OUT1 file will be
The output for OUT2 file will be