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 vaildation using CICS

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

New User


Joined: 28 Oct 2006
Posts: 6

PostPosted: Fri May 11, 2007 10:01 am    Post subject: Date vaildation using CICS
Reply with quote

Hi,
I am getting date as input from an unprotected field in the format YYYY-MM-DD and validate that date. Do anyone know any routine to validate the date? Like for a non-leap year user cannot enter Feb 29 or invalid date like 2007-14-31 :!:
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri May 11, 2007 2:52 pm    Post subject:
Reply with quote

Have you looked at some of the intrinsic functions?
Back to top
View user's profile Send private message
neoarvind

New User


Joined: 28 Oct 2006
Posts: 6

PostPosted: Mon May 14, 2007 10:43 am    Post subject: Re: Date vaildation using CICS
Reply with quote

Not yet Thom...tell me if you know any
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon May 14, 2007 4:50 pm    Post subject:
Reply with quote

Intrinsic functions
Back to top
View user's profile Send private message
neoarvind

New User


Joined: 28 Oct 2006
Posts: 6

PostPosted: Tue May 15, 2007 9:24 am    Post subject:
Reply with quote

Hi Thompson,
Thank you for the link. But i really have no idea how to use these functions in my program and how can i use this to validate the date entries..Please help me out!
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue May 15, 2007 2:20 pm    Post subject:
Reply with quote

Look at INTEGER-OF-DATE and DATE-OF-INTEGER. If you removed the "-"s and converted the date to an integer and back to a date, you could compare the first to the second - if they are different, the first date was invalid.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu May 24, 2007 6:00 pm    Post subject:
Reply with quote

neoarvind wrote:
But i found that a small query can be used to evaluate the input date. The query is,
EXEC SQL
SELECT CHAR(DATE(:WS-VLD-DT))
INTO :WS-VLD-DT
FROM SYSDUMMY1
WITH UR
END-EXEC
where ws-vld-dt is the input date in the format YYYY-MM-DD. if the response of this query is normal, then the date is valid!!
Good for you....
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 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
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am


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