Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us