IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

to make one file using 2 files


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
comp_ashok

New User


Joined: 30 Nov 2007
Posts: 15
Location: India

PostPosted: Thu Dec 13, 2007 12:32 pm
Reply with quote

Hi all,

My requirement is:

input1: fb, lrec=7

2222600
3333700
4444300

input2 : fb, lrec=8

11117000
22220100
33331200


output file:fb ,lrec=11

11110007000
22226000100
33337001200
44443000000

initial 4 bytes are same, next 3 from input file 1 , next 4 from input file2
if initial 4 bytes are not present in that file thyen place zeros.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Dec 13, 2007 1:14 pm
Reply with quote

Code:
//*******************************************************             
//STEP001  EXEC PGM=ICETOOL                                           
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN1      DD *                                                       
2222600                                                               
3333700                                                               
4444300                                                               
/*                                                                   
//IN2      DD *                                                       
11117000                                                             
22220100                                                             
33331200                                                             
/*                                                                   
//TMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//BOTH     DD SYSOUT=*                                               
//TOOLIN   DD *                                                       
 COPY FROM(IN1)  TO(TMP1) USING(CP01)                                 
 COPY FROM(IN2)  TO(TMP1) USING(CP02)                                 
 SPLICE FROM(TMP1) TO(BOTH) ON(1,4,CH) WITH(8,4) -
   KEEPNODUPS USING(CP03)                         
/*                                               
//CP01CNTL DD   *                                 
  OUTREC BUILD=(1,7,8:4C'0',12:C'11')             
/*                                               
//CP02CNTL DD   *                                 
  OUTREC BUILD=(1,4,5:3C'0',8:5,4,12:C'22')       
/*                                               
//CP03CNTL DD   *                                 
  OUTFIL FNAMES=BOTH,BUILD=(1,11)                 
/*                                               


OUT:
Code:
11110007000
22226000100
33337001200
44443000000
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top