Monday, January 24, 2011

ICETOOL - to copy the first duplicate record from input file to output file

//PARMTMP2 EXEC  PGM=PARMIN,                                        
//             PARM='SELECT FROM(IN) TO(OUT) ON(1,15,CH) FIRSTDUP'                                              

//SYSIN    DD  DSN=&&CTL02,                                         
//             DISP=(,PASS),                                        
//             UNIT=SYSDA,                                          
//             SPACE=(80,3)                                         
//*                                                                 
//STEP030  EXEC PGM=ICETOOL                                         
//DFSMSG   DD  SYSOUT=*                                             
//TOOLMSG  DD  SYSOUT=*                                             
//IN       DD  DSN=PCCCN.CN2125DP.RECYCLE.CHGO.HDRS,                
//             DISP=SHR                                             
//         DD  DSN=&&TEMP2,                                         
//             DISP=(OLD,DELETE)                                    
//OUT      DD  DSN=&&TEMP3,                                         
//             DISP=(,PASS),                                        
//             UNIT=SYSDA,                                          
//             SPACE=(CYL,(1,1),RLSE),                              
//             DCB=(RECFM=FB,LRECL=290)                             
//TOOLIN   DD  DSN=&&CTL02,                        
//             DISP=(OLD,PASS)                     
//*                                                
Based on the duplicates in field 1 to 15 characters, first occurrence is copied to output file

No comments:

Post a Comment