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
 

 

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 Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us