SORT to mutiple output
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Hi all,
I tried to create mutiple outputs (OUTPUT1/2/3) using a input DS via SORT, here is my JCL:
OPTION COPY
OUTFIL FNAMES=OUTPUT1,OUTREC=(C'OUTPUT1',1,18,55X)
OUTFIL FNAMES=OUTPUT2,OUTREC=(C'OUTPUT2',1,18,55X)
OUTFIL FNAMES=OUTPUT3,OUTREC=(C'OUTPUT3',1,18,55X)
My expected results are:
OUTPUT1 DS contents: string 'OUTPUT1, col 1~18 from input DS and blanks'
OUTPUT2 DS contents: string 'OUTPUT2, col 1~18 from input DS and blanks'
OUTPUT3 DS contents: string 'OUTPUT3, col 1~18 from input DS and blanks'
But all the output DS content: string 'OUTPUT3, col 1~18 from input DS and blanks'
Please kindly advise, any input is appreciated. Thanks.
I tried to create mutiple outputs (OUTPUT1/2/3) using a input DS via SORT, here is my JCL:
OPTION COPY
OUTFIL FNAMES=OUTPUT1,OUTREC=(C'OUTPUT1',1,18,55X)
OUTFIL FNAMES=OUTPUT2,OUTREC=(C'OUTPUT2',1,18,55X)
OUTFIL FNAMES=OUTPUT3,OUTREC=(C'OUTPUT3',1,18,55X)
My expected results are:
OUTPUT1 DS contents: string 'OUTPUT1, col 1~18 from input DS and blanks'
OUTPUT2 DS contents: string 'OUTPUT2, col 1~18 from input DS and blanks'
OUTPUT3 DS contents: string 'OUTPUT3, col 1~18 from input DS and blanks'
But all the output DS content: string 'OUTPUT3, col 1~18 from input DS and blanks'
Please kindly advise, any input is appreciated. Thanks.