banand
New User
Joined: 05 Jun 2007 Posts: 28 Location: Mumbai
|
|
|
|
My job is used to convert (By COBOL program) the Common delimited variable block file in to Fixed format fixed block file. And this job is a dataset triggered job that is when ever third party send us the file this job will be triggered. Now there is only one third party so no problem ,but there is new third coming in to picture, so they will be sending the file in different file name.
Now instead of using different Jcl I am planning to use one JCL and include member in it which has the DD statement for the input file. Based on the output of the List cat (Gives which third party file cataloged)I will be creating this Include member. Now by giving the listcat output to the sort card I have tried to create multiple members (Since I need to change the file names in different steps) using outfil statement, but all the members are written with the output of the last outrec statement instead of corresponding outrec statement. Below I have attached the screen shot of my JCL
Code: |
//PS020 EXEC PGM=SORT
//SORTJNF1 DD DSN=WXX262.LISTCAT.E3USI250,DISP=SHR
//SORTJNF2 DD DSN=WXX262.MAPPING.FILE,DISP=SHR
//BKPFILE DD DSN=WXX830.BALA.SEMIS(TEST12),DISP=OLD
//INFILE DD DSN=WXX830.BALA.SEMIS(TEST13),DISP=OLD
//SYSIN DD *
JOINKEYS FILES=F1,
FIELDS=(033,004,A),INCLUDE=(13,7,CH,EQ,C'NONVSAM')
JOINKEYS FILES=F2,
FIELDS=(001,004,A)
REFORMAT FIELDS=(F2:001,4,F1:22,44,F2:5,44)
SORT FIELDS=(1,10,CH,A),STOPAFT=1
OUTFILE FNAMES=BKPFILE,
OUTREC=(1:C'//SORTIN DD DISP=SHR,DSN=',26:5,44,70:11X,/,
1:C'//SORTOUT DD DISP=(NEW,CATLG,DELETE),',38:43X,
/,1:C'// ',11:C'DSN=',15:49,44,59:21X)
OUTFILE FNAMES=INFILE,
OUTREC=(1:C'//E3250I01 DD DISP=SHR,DSN=',28:49,44,72:09X)
/*
//SYSOUT DD SYSOUT=*
|
Please help me to create different output in multiple members in the same PDS. Also please let me know if you need any more details |
|