Page 1 of 1

Tweak this syncsort job for me.

PostPosted: Tue Sep 09, 2008 12:29 am
by ranga_subham
Hi,

I am using 3.14 to search for a copybook used in different programs. It found many entries and listed out. I used the below syncsort job to finalize the program the copybook used in.....

//STEP02   EXEC PGM=SORT             
//SORTIN   DD DSN=XXXXXX.SRCHFOR.LIST,
//            DISP=SHR               
//SORTOF1  DD DSN=XXXXX.XXXXX.OUT1,             
//            DISP=(NEW,CATLG,DELETE),           
//            UNIT=SYSDA,                       
//            SPACE=(TRK,(1,1),RLSE),           
//            DCB=(RECFM=FB,LRECL=136,BLKSIZE=0)
//SORTOF2  DD DSN=XXXXX.XXXXX.OUT2,             
//            DISP=(NEW,CATLG,DELETE),           
//           UNIT=SYSDA,                         
//           SPACE=(TRK,(1,1),RLSE),             
//           DCB=(RECFM=FB,LRECL=136,BLKSIZE=0) 
//SYSOUT  DD SYSOUT=*                           
//SYSIN   DD *                                   
 SORT FIELDS=COPY                               
 OUTFIL FILES=1,                                 
    INCLUDE=(41,6,CH,EQ,C'STRING'),             
    OUTREC=(1,133,SEQNUM,3,ZD)                   
 OUTFIL FILES=2,                                 
    INCLUDE=(1,133,SS,EQ,C'COPY'),               
    OUTREC=(1,133,SEQNUM,3,ZD)                   
/*                                               
//*                                             
//STEP03  EXEC PGM=SORT                         
//SORTIN  DD DSN=XXXXX.XXXXX.OUT1,DISP=SHR       
//        DD DSN=XXXXX.XXXXX.OUT2,DISP=SHR       
//SYSOUT  DD SYSOUT=*                           
//OUT1    DD DSN=XXXXX.XXXXX.OUT4,               
//           DISP=(NEW,CATLG,DELETE),           
//           UNIT=SYSDA,                         
//           SPACE=(TRK,(1,1),RLSE),             
//           DCB=(RECFM=FB,LRECL=133,BLKSIZE=0) 
//SYSIN   DD *                                   
 SORT FIELDS=(134,3,ZD,A),EQUALS                 
 OUTFIL FNAMES=OUT1,OUTREC=(1,133)               
/*                                               


But, the output is giving all the remaining duplicates to the bottomest member!!

Please help.

Thanks.

Re: Tweak this syncsort job for me.

PostPosted: Tue Sep 09, 2008 12:43 am
by dick scherrer
Hello,

Please post the first part of the data from out1 and out2 as well as a bit of the output created and what you wanted as output instead.

Please use the "Code" tag to make your reply more readable.

Use Preview to view your post as the forum will see it rather than what is shown in the Reply editor. When you are satisfied with the appearance, Submit.