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

Overlaying a field in file with data from one another file


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

New User


Joined: 02 Jun 2006
Posts: 5

PostPosted: Wed Aug 16, 2006 9:37 pm
Reply with quote

Please can anyone tell me to how to Overlay a field in file with data from one another file

file:1 recfm=fb leng=80
2008-08-10

file:2recfm=vb leng=3606
AAAA2006-07-2100xxxxxxxxxxxxxxxxxxxxxxxxxxxx
ZZZZ2006-07-2199xxxxxxxxxxxxxxxxxxxxxxxxxxxx

out file should look like and recfm=vb leng=3606
AAAA2008-08-1000xxxxxxxxxxxxxxxxxxxxxxxxxxxx
ZZZZ2008-08-1099xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Aug 17, 2006 1:10 am
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file1 (FB/80)
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY,STOPAFT=1
* Create DFSORT symbol as:
* MYDATE,'yyyy-mm-dd'
  OUTREC FIELDS=(C'MYDATE,''',1,10,C'''',80:X)
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input file2 (VB/3606)
//SORTOUT DD DSN=... output file (VB/3606)
//SYSIN    DD    *
  OPTION COPY
* Use MYDATE to overlay old date.
  INREC OVERLAY=(9:MYDATE)
/*
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top