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
 
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 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

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