Vigneshwaran S Warnings : 1 New User
Joined: 10 Dec 2008 Posts: 60 Location: Chennai
|
|
|
|
I have a input file which is having more 15000 lines and i wanna split it into several output files each having 5,000 records. This is the JCL im using,
Code: |
//SPLITFLS EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN DD DSN=input.xxx.yyy.zzzzz,DISP=SHR
//SORTOF01 DD DSN=output1,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,1),RLSE),
// RECFM=FB,LRECL=80
//SORTOF02 DD DSN=output2,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,1),RLSE),
// RECFM=FB,LRECL=80
//SORTOF03 DD DSN=Output3,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,1),RLSE),
// RECFM=FB,LRECL=80
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,ENDREC=5000,REMOVECC,
TRAILER1=(2/,'RECORDS COPIED IN THIS RPT: ',COUNT=(M11,LENGTH=8))
OUTFIL FILES=02,STARTREC=5001,ENDREC=10000,REMOVECC,
TRAILER1=(2/,'RECORDS COPIED IN THIS RPT: ',COUNT=(M11,LENGTH=8))
OUTFIL FILES=03,STARTREC=10001,ENDREC=15000,REMOVECC,
TRAILER1=(2/,'RECORDS COPIED IN THIS RPT: ',COUNT=(M11,LENGTH=8))
//*
|
How to allocate output datasets dynamically?
For example :
If an input file comes with 30,000 lines,according to my requirement i should seperate this into 6 files. At the time of processing i shuld give only number '6' my JCL should automatically allocate output datasets.
Please give me some suggestions!! |
|