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

how to get century from date in cics


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

New User


Joined: 29 Dec 2010
Posts: 41
Location: Mumbai

PostPosted: Thu Mar 31, 2011 6:50 pm
Reply with quote

we can use below lines to get date


EXEC CICS ASKTIME
ABSTIME (WS-ABSTIME)
END-EXEC.

EXEC CICS FORMATTIME
ABSTIME(WS-ABSTIME)
MMDDYY(WS-DATE)
TIME(WS-TIME)
END-EXEC.



but i need date of Format: CCYYMMDD

so i need century...


can anyone tell me how to get century.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 31, 2011 6:56 pm
Reply with quote

This is easily answered.

Review Keyword "YYYYMMDD" (a/k/a "CCYYMMDD") for the "FORMATTIME" API and all will be forgiven.... icon_rolleyes.gif

You can fool with this via "CECI".

Make sure "WS-DATE" is PIC X(10) if you use the DATESEP Keyword.

Bill
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 31, 2011 6:59 pm
Reply with quote

RTFM.
CICS Application Programming Reference manual, link at the top of the page, section 1.87 on FORMATTIME
Back to top
View user's profile Send private message
Arun bv

New User


Joined: 29 Dec 2010
Posts: 41
Location: Mumbai

PostPosted: Thu Mar 31, 2011 6:59 pm
Reply with quote

you mean to say

EXEC CICS FORMATTIME
ABSTIME(WS-ABSTIME)
YYYYMMDD(WS-DATE)
TIME(WS-TIME)
END-EXEC


use it in the command and take first two YY of "YYYY" ,,,and that will give century
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 31, 2011 7:03 pm
Reply with quote

You should move over to A Forum for Mainframe Beginners and Students since your questions demonstrate you need to be there. This forum is for professionals -- ones who can read manuals and don't need confirmation when told an answer.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 31, 2011 7:10 pm
Reply with quote

nothing that You could not have found by Yourself
looking at the cics manuals here

or lazier googling for EXEC CICS FORMATTIME
which would have taken You here
Back to top
View user's profile Send private message
Arun bv

New User


Joined: 29 Dec 2010
Posts: 41
Location: Mumbai

PostPosted: Thu Mar 31, 2011 7:16 pm
Reply with quote

thanks to all replies and comments....
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Using API Gateway from CICS program CICS 0
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Calling an Open C library function in... CICS 1
Search our Forums:

Back to Top