SORT to mutiple output
Posted: Sat Jul 18, 2009 7:30 am
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.