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: 7936
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: 7936
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: 10211
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 CICS to Webservices safexc CICS 1 Sun Jan 22, 2017 5:49 pm
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 2 Thu Jan 19, 2017 1:31 am
No new posts INDEPENDENT CICS TS 4.1 MRO REGION UP... Kyle Carroll CICS 0 Wed Dec 14, 2016 6:55 pm
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm


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