Page 1 of 1

sort or merge three files to one output file.

PostPosted: Wed May 09, 2012 11:22 pm
by dn2012
Hello,

I am sorting or merge three files to one output file.

//SORT    EXEC PGM=SORT                                   
//SYSIN    DD  *                                           
//SORTIN   DD  DSN=TSSDN.DATA.CONCATD1,DISP=SHR           
//         DD  DSN=TSSDN.DATA.CONCATD2,DISP=SHR           
//         DD  DSN=TSSDN.DATA.CONCATD3,DISP=SHR           
//SORTOUT  DD  DSN=TSSDN.DATA.CONCATD4,                   
//             DISP=(NEW,CATLG,DELETE),                   
//             STORCLAS=MFI,                               
//             SPACE=(TRK,5),                             
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SYSOUT   DD  SYSOUT=*                                   
//*


But getting message as:

TSSDNOUT SORT - STEP WAS EXECUTED - COND CODE 0016

----------------------------------------------------------------------------
NO SORT OR MERGE CONTROL STATEMENT
C5-K62149 C6-K90026 E7-K90026

What am I missing? Any assist will be appreciated.

thanks

Re: sort or merge three files to one output file.

PostPosted: Wed May 09, 2012 11:28 pm
by Robert Sample
You place the SORT statement in your JCL after the //SYSIN DD * and the fact that you did not do so is what the computer message is telling you.

Re: sort or merge three files to one output file.

PostPosted: Wed May 09, 2012 11:58 pm
by dn2012
Thanks

I moved /SYSIN DD * outside JCL and its work.

//SORT    EXEC PGM=SORT                                     
//SORTIN   DD  DSN=TSSDN.DATA.CONCATD1,DISP=SHR             
//         DD  DSN=TSSDN.DATA.CONCATD2,DISP=SHR             
//         DD  DSN=TSSDN.DATA.CONCATD3,DISP=SHR             
//SORTOUT  DD  DSN=TSSDN.DATA.CONCATD4,                     
//             DISP=(NEW,CATLG,DELETE),                     
//             STORCLAS=MFI,                                 
//             SPACE=(TRK,5),                               
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) 
//SYSOUT   DD  SYSOUT=*                                     
//SYSIN    DD  *                                             
  SORT FIELDS=COPY
//*               


thanks

Re: sort or merge three files to one output file.

PostPosted: Thu May 10, 2012 1:02 am
by NicC
You could have left your sysin where it was - you just did not have the control card immediately following. And 'outside JCL' is rubbish - your SYSIN is PART of the JCL.