MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Any alternate for Splice

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
hchinnam
Beginner


Joined: 04 Feb 2005
Posts: 31
Topics: 10

PostPosted: Wed Aug 27, 2008 7:33 am    Post subject: Any alternate for Splice Reply with quote

Hello all,

I am using following JCL to get the matching records between two files. My file1 has only 20000 accounts and my file2 has over 168,000,000 records (both are in sorted order). I am trying to get all the records from files2 that match with file1.

Is there any other efficient way of doing this? (Writing a program could solve my problem, but i am trying to do this using IBM utilities)


Code:


//STEP01   EXEC  PGM=ICETOOL   
//SYSPRINT DD SYSOUT=*         
//SYSOUT   DD SYSOUT=*         
//TOOLMSG  DD SYSOUT=*         
//DFSMSG   DD SYSOUT=*         
//DFSPARM  DD *               
  OPTION DYNALLOC=(SYSDA,20)   
//IN1      DD DISP=SHR,DSN=file1
//IN2      DD DISP=SHR,DSN=file2
//OUT      DD DSN=outfile,               
//            DISP=(NEW,CATLG),                                       
//            DCB=file2,               
//            DATACLAS=PRDCNORM                                       
//TEMP1  DD DSN=&&TEMP1,DISP=(MOD,PASS),                           
//           DATACLAS=PRDCNORM,DCB=LRECL=9201,RECFM=FB)             
//TOOLIN   DD *                                                       
  COPY FROM(IN1) TO(TEMP1) USING(CTL1)                               
  COPY FROM(IN2) TO(TEMP1) USING(CTL2)                               
  SPLICE FROM(TEMP1) TO(OUT) ON(1,22,CH) -                           
   WITH(1,9200) USING(CTL3) WITHALL                                   
//CTL1CNTL DD *                                                       
  INREC BUILD=(1:1,22,9201:C'X')                                     
/*                                                                   
//CTL2CNTL DD *                                                       
  INREC OVERLAY=(9201:C'Y')                                           
/*                                                                   
//CTL3CNTL DD *                                                       
  OUTFIL FNAMES=OUT,                                                 
  INCLUDE=(9201,1,CH,EQ,C'X'),                                       
  BUILD=(1,9200)                                                     
/*


Thanks,
Harsha Chinnam
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group