Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us