cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
I have a sort step, in which the number of output files is to be determined by the number of records in a Vsam file.
I have developed a dynamic sort card
Code: |
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,REMOVECC,
HEADER1=(3:'SORT FIELDS=COPY',80:X),
OUTREC=(3:C'OUTFIL FILES=',SEQNUM,2,ZD,18:C',',80:X,/,
5:C'INCLUDE=(56,5,CH,EQ,C''',37,5,C'''),',80:X,/,
5:C'OUTREC=(1:1,55)',80:X) |
Output1 :
Code: |
SORT FIELDS=COPY
OUTFIL FILES=01,
INCLUDE=(56,5,CH,EQ,C'AAAAA'),
OUTREC=(1:1,55)
OUTFIL FILES=02,
INCLUDE=(56,5,CH,EQ,C' 2382'),
OUTREC=(1:1,55) |
I hvae another dynamic sort for the number of files
Code: |
SORT FIELDS=COPY
OUTFIL BUILD=(1:C'//SORTOF',SEQNUM,2,ZD,C' DD DSN',
C'=T.TPS266DP.FILE',SEQNUM,2,ZD,C',',80:X,/,
C'// DISP=(,CATLG,DELETE),',80:X,/,
C'// UNIT=SYSDA,',80:X,/,
C'// SPACE=(80,(1000,500),RLSE),',80:X,/,
C'// DCB=(RECFM=FB,LRECL=80),',80:X) |
Output file content
Code: |
//SORTOF01 DD DSN=T.TPS266DP.FILE01,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(80,(1000,500),RLSE),
// DCB=(RECFM=FB,LRECL=80),
//SORTOF02 DD DSN=T.TPS266DP.FILE02,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(80,(1000,500),RLSE),
// DCB=(RECFM=FB,LRECL=80), |
Now I need to give the content of output2 as the files in a job using the output1 as the sortcard. |
|