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
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
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 VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm

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