I have gone thru few of the posts regarding the use of Julian date and time (HHMM format) on the header1 and trailer1 records of the SORT card. I know that TIME2 option can not be used with header1 and trailer1.
There was a post where workaround was possible with BUILD but the position of the time was at end of the header and trailer record.
I have created a SORT card which will temporarily put the HHMM characters in the first SORT step and in the next SORT step I will replace them with TIME2 option. The output file is of 740 characters.
My query is - is any other solution to have time (HHMM format) in the middle of the header1 and trailer record.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
You're going to have to prepend (variable-length records) or append (fixed-length) an HHMM field to each record, and then reference that field in HEADER1 and TRAILER1.
In HEADER1 it will use the data from the first (if any) record of the OUTFIL group. In TRAILER1 it will use the data from the last (if any) record of the OUTFIL group.