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
 
To add a time stamp in header and trailer record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
manikandanjs

New User


Joined: 02 Jun 2006
Posts: 27
Location: Blue Bell, PA

PostPosted: Tue Dec 19, 2006 5:02 pm    Post subject: To add a time stamp in header and trailer record
Reply with quote

Could you please provide a solution to the below problem?

1. I have 5 files each with n number of records.
2. These 5 files needs to be concatenated.
3. Need to add header and trailer which includes the time stamp (date and current time).
4. Need to insert the count in the trailer record (including the total number of combined records).

J Manikandan
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: Tue Dec 19, 2006 9:17 pm    Post subject:
Reply with quote

Assuming all of the files are VB, or FB with the same LRECL, you can use a DFSORT job like the following to do what you asked for. You can change the formatting of the date, time and count appropriately depending on what you want them to look like.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file1
//       DD DSN=...  input file2
//       DD DSN=...  input file3
//       DD DSN=...  input file4
//       DD DSN=...  input file5
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,HEADER1=(DATE=(4MD/),X,TIME=(24:)),
    TRAILER1=(DATE=(4MD/),X,TIME=(24:),X,COUNT=(M11,LENGTH=8))
/*


SORTOUT might look like this:

Code:

2006/12/19 07:38:32                       
record
...                         
2006/12/19 07:38:32 00000011               


I assumed you wanted the count of just the input records. If you want the count of the input records + 2 for the header and trailer record, use:

Code:

COUNT+2=(M11,LENGTH=8)
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 VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts How syntax check at Bind time is diff... Poha Eater DB2 5 Wed Mar 21, 2018 9:16 pm
No new posts Merging records, but not all the time prino DFSORT/ICETOOL 17 Sat Feb 17, 2018 4:20 pm
No new posts Need to identify top 10 costly or tim... ashek15 DB2 4 Wed Feb 14, 2018 3:20 am
No new posts Logic to skip Maximum time-stamp and ... vickey_dw DB2 2 Thu Feb 01, 2018 11:15 pm

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