My output should look like this:
H2006-01-11-12.01.37.046607
I0001ABC XXXXX XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX
I0002BCE XXXXX XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX
T000000000000002
header record should contain the current timestamp and trailer record should have the total number of records in that file. Could any one please help me how to get the current time stamp in easy trieve?.
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
Posted: Wed Jan 11, 2006 9:22 am Post subject:
yugee,
Are you restricted to easytrieve only ? Can you use Sort to do the task? With sort it is easy. However you cannnot the Micro seconds portion of the timestamp field.
Hi Kolusu,
Thanks for your quick reply.
the output file, we will be sending to some external system and we have alreadyy committed that we will be sending that format. if we use Sort, we will be missing the micro second part of the time stamp. Is there any way we can inlude that also?.
we are thinking of having a COBOL program, but this is at the worst case scenario...
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
Posted: Wed Jan 11, 2006 12:01 pm Post subject:
Yugee,
Neither SORT nor Easytrieve has the capability of getting the timestamp (year, month, day, hour, minute, second, and microsecond ) in the form yyyy-mm-dd-hh.mm.ss.nnnnnn
Do you really care about microsecond portion? Can't you just hardcode '000001' for microsecond portion ?
CURRENT-DATE W 10 A
CURRENT-MM CURRENT-DATE 02 A
CURRENT-DD CURRENT-DATE +3 02 A
CURRENT-YY CURRENT-DATE +6 04 A
W-HDR-REC W 80 A
W-HDR-IND W-HDR-REC 01 A VALUE 'H'
W-HDR-DATE-YY W-HDR-REC +01 04 A
W-HDR-DATE-S1 W-HDR-REC +05 01 A VALUE '-'
W-HDR-DATE-MM W-HDR-REC +06 02 A
W-HDR-DATE-S2 W-HDR-REC +08 01 A VALUE '-'
W-HDR-DATE-DD W-HDR-REC +09 02 A
W-FIL1 W-HDR-REC +11 01 A VALUE '.'
W-HDR-TIME W-HDR-REC +12 08 A
W-HDR-MSEC W-HDR-REC +20 07 A VALUE '.000001'
W-TRLR-REC W 80 A
W-TRLR-IND W-TRLR-REC 01 A VALUE 'T'
W-TRLR-COUNT W-TRLR-REC +01 15 N
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum