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
 

 

Overlaying a field in file with data from one another file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Overlaying a field in file with data from one another file
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 Moderator


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

PostPosted: Thu Aug 17, 2006 1:10 am    Post subject:
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    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 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 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