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
 

 

OVERLAY 3 files data into the fourth file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Wed Jul 09, 2008 11:29 am    Post subject: OVERLAY 3 files data into the fourth file
Reply with quote

I have 4 files with same number of records in order in it with different record lengths as provided below:

FILEN - Record Length of 100
FILE1 - Record Length of 10
FILE2 - Record Length of 10
FILE3 - Record Length of 10

The data present in the 3 files FILE1, FLE2, FILE3 need to be overlayed into the following positions of the file FILEN respectively:

FILE1 data should be overlayed at position 21-30 in file FILEN
FILE2 data should be overlayed at position 41-50 in file FILEN
FILE3 data should be overlayed at position 61-70 in file FILEN

Records in all the files are in proper order such that data from first record of all the 3 files (FILE1,FILE2,FILE3) into the first record of the final file (FILEN) and so on till the last record.
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Jul 10, 2008 4:13 am    Post subject:
Reply with quote

Aham,

The following DFSORT/ICETOOL JCL will give you the desired results. The working of the job is explained in detail here

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.13.2.2?

Code:

//STEP0100 EXEC PGM=ICETOOL                                     
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG   DD SYSOUT=*                                         
//FILEN    DD *                                                 
ABC 09544 DFH                                                   
XYZ 12345 ROI                                                   
CYX 43844 AKL                                                   
//FILE1    DD *                                                 
AAAAAAAAAA                                                     
BBBBBBBBBB                                                     
CCCCCCCCCC                                                     
//FILE2    DD *                                                 
DDDDDDDDDD                                                     
EEEEEEEEEE                                                     
FFFFFFFFFF                                                     
//FILE3    DD *                                                 
GGGGGGGGGG                                                     
HHHHHHHHHH                                                     
IIIIIIIIII                                                     
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(1,1),RLSE)   
//OUT      DD SYSOUT=*                                         
//TOOLIN   DD *                                         
  COPY FROM(FILEN) USING(CTL1)                         
  COPY FROM(FILE1) USING(CTL2)                         
  COPY FROM(FILE2) USING(CTL3)                         
  COPY FROM(FILE3) USING(CTL4)                         
  SPLICE FROM(T1) TO(OUT) ON(131,8,PD) WITHEACH -       
  WITH(101,10) WITH(111,10) WITH(121,10) USING(CTL5)   
//CTL1CNTL DD *                                         
  OUTFIL FNAMES=T1,OVERLAY=(101:30X,SEQNUM,8,PD)       
//CTL2CNTL DD *                                         
  OUTFIL FNAMES=T1,BUILD=(101:1,10,20X,SEQNUM,8,PD)     
//CTL3CNTL DD *                                         
  OUTFIL FNAMES=T1,BUILD=(101:10X,1,10,10X,SEQNUM,8,PD)
//CTL4CNTL DD *                                         
  OUTFIL FNAMES=T1,BUILD=(101:20X,1,10,SEQNUM,8,PD)     
//CTL5CNTL DD *                                         
  OUTFIL FNAMES=OUT,                                   
  BUILD=(01,20,101,10,31,10,111,10,51,10,121,10,71,30) 
/*


The output from this job is

Code:

ABC 09544 DFH       AAAAAAAAAA          DDDDDDDDDD          GGGGGGGGGG
XYZ 12345 ROI       BBBBBBBBBB          EEEEEEEEEE          HHHHHHHHHH
CYX 43844 AKL       CCCCCCCCCC          FFFFFFFFFF          IIIIIIIIII


Hope this helps...
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 11 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 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


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