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
 

 

how to get century from date in cics

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: how to get century from date in cics
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 31, 2011 6:56 pm    Post subject: Reply to: how to get century from date in cics
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: 7997
Location: Bellevue, IA

PostPosted: Thu Mar 31, 2011 6:59 pm    Post subject:
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    Post subject: how to get century from date in cics
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: 7997
Location: Bellevue, IA

PostPosted: Thu Mar 31, 2011 7:03 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Thu Mar 31, 2011 7:10 pm    Post subject: Reply to: how to get century from date in cics
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    Post subject: century
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    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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 0 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am


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