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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm


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