Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

to make one file using 2 files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: to make one file using 2 files
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us