View previous topic :: View next topic
|
Author |
Message |
Chandru3183
New User
Joined: 02 May 2015 Posts: 1 Location: India
|
|
|
|
I have a requirement in implementing time stamp in CICS with the below format.
Code: |
2003-04-24T10:01:02+00:00
YYYY-MM-DDTHH:MM:SS+.. |
1. When i searched in google i got to know it is RFC3339 format. Is there a way to populate current time stamp with the above format in CICS?
2. I am able to populate date, time value with filler like the below but unable to populate last 5 characters(00:00).
2003-04-24T10:01:02+
Can you please let me know how to populate only time zone value in COBOL-CICS program. I hope +00:00 indicates the time zone value. Please correct me if i am wrong. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
EXEC CICS ASKTIME ABSTIME(time-variable) END-EXEC
EXEC CICS FORMATTIME ABSTIME(time-variable)
DATESTRING (data-area)
STRINGFORMAT (RFC3339)
END-EXEC
|
is how I would do it (although I would add RESP and a response variable). time-variable is an 8-byte packed decimal and data-area is PIC X(64). |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
After getting a chance to test the commands, what is actually needed is
Code: |
EXEC CICS ASKTIME ABSTIME(time-variable) END-EXEC
EXEC CICS FORMATTIME ABSTIME(time-variable)
DATESTRING (data-area)
RFC3339
END-EXEC
|
|
|
Back to top |
|
|
|