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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts 3270 Data stream error Benchwarmer CICS 4 Tue Apr 17, 2018 12:06 am
No new posts How to list data set names with diffe... murali.andaluri CLIST & REXX 8 Thu Apr 12, 2018 11:33 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm

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