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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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