Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

SYNCSORT :: RE: Update the Sortout file with record count at defined pos

$
0
0
Author: Rohit Umarjikar
Posted: Tue May 17, 2016 10:17 pm (GMT 5.5)

Tested.
Code:
//S1    EXEC  PGM=ICEMAN                                       
//SYSOUT    DD  SYSOUT=*                                       
//SORTIN DD *                                                 
10                                                             
20                                                             
30                                                             
40                                                             
//SYM DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)   
//SYSIN    DD    *                                             
   OPTION COPY                                                 
   OUTFIL FNAMES=SYM,REMOVECC,NODETAIL,                       
     BUILD=(80X),                                             
     TRAILER1=('CNT,''',COUNT=(M11,LENGTH=4),C'''')           
//S2    EXEC  PGM=ICEMAN                   
//SYSOUT    DD  SYSOUT=*                   
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)     
//SORTIN DD *                               
DAT1                                       
DAT2                                       
DAT3                                       
//SORTOUT DD SYSOUT=*                       
//SYSIN    DD    *                         
   OPTION COPY                             
   INREC IFTHEN=(WHEN=(1,4,CH,EQ,C'DAT3'), 
     OVERLAY=(6:C'- NO OF RECORDS - ',CNT))


You may also be able to do with joinkeys and seq no concept.
_________________
Regards,
Rohit Umarjikar
"Some things Man was never meant to know. For everything else, there's Google"


Viewing all articles
Browse latest Browse all 9405

Latest Images

Trending Articles



Latest Images