IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

current date & time


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lakshmibala

New User


Joined: 16 Jun 2004
Posts: 47

PostPosted: Mon Jun 21, 2004 10:13 am
Reply with quote

hi,

how to get the current date & time from the cics region .

explain it with the code.

i know that the function used is asktime and formattime but tell me how to implement

bye with regards,

laskhmi icon_lol.gif
Back to top
View user's profile Send private message
thampirahul

New User


Joined: 19 May 2004
Posts: 3

PostPosted: Mon Jun 21, 2004 10:29 am
Reply with quote

hai
exec cics asktime
end-exec.
exec cics formattime
mmddyy(ws-var)
end-exec.

You will get time in the working storage variable ws-var in the mentioned format
Back to top
View user's profile Send private message
imvs

New User


Joined: 12 May 2004
Posts: 33

PostPosted: Mon Jun 21, 2004 11:11 am
Reply with quote

01 ws-date-vars.
02 ws-abs-time pic s9(15) comp-3.
02 ws-mmddyyyy pic x(10).
02 ws-time pic x(8).

******* to get absolute time
EXEC CICS ASKTIME
ABSTIME(ws-abs-time)
END EXEC.
******* to get date and time in required format
EXEC CICS FORMATTIME
ABSTIME(ws-abs-time)
MMDDYYYY(ws-mmddyyyy)
DATESEP('-')
TIME(ws-time)
TIMESEP
END-EXEC
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Date format correction using dfsort DFSORT/ICETOOL 3
No new posts Sorting Date Field DFSORT/ICETOOL 4
No new posts CONVERT a given date from UTC TO BST CICS 0
No new posts Pull data using date difference betwe... DB2 6
No new posts CA7 count with DATE variable CA Products 0
Search our Forums:

Back to Top