sort or merge three files to one output file.



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

sort or merge three files to one output file.

Postby dn2012 » Wed May 09, 2012 11:22 pm

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
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby Robert Sample » Wed May 09, 2012 11:28 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

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

Postby dn2012 » Wed May 09, 2012 11:58 pm

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
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Thu May 10, 2012 1:02 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post