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 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