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
 

 

Date and time format in CICS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Chandru3183

New User


Joined: 02 May 2015
Posts: 1
Location: India

PostPosted: Sat Mar 18, 2017 12:46 pm    Post subject: Date and time format in CICS
Reply with quote

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
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8119
Location: East Dubuque, Illinois, USA

PostPosted: Sat Mar 18, 2017 6:46 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8119
Location: East Dubuque, Illinois, USA

PostPosted: Sun Mar 19, 2017 8:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm


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