Can anyone direct me to some IBM Date API's for Validating Dates. We have some old CL programs that I would like to validate the date the user key's in. Thank You
Can anyone direct me to some IBM Date API's for Validating Dates. We have some old CL programs that I would like to validate the date the user key's in. Thank You
John, I have used CVTDAT and monitored for a message. Something like: DCL &DATEIN *CHAR 10 DCL &DATEOUT *CHAR 10 DCL &DATEERR *LGL ... Some code to set &DATEIN CVTDAT &DATEIN &DATEOUT FROMFMT(*MDY) TOFMT(*MDY) TOSEP(*NONE) MONMSG CPF0000 EXEC(CHGVAR &DATEERR '1') ... If you are using a message subfile in your program, this will work very well as the message will be sent. David Morris
If you are looking for API's versus a CL command, you will find various date API's in the ILE CEE API's section and the Miscellaneous API's section of the System API Reference manual. Good luck!
I recommend the ILE CEE date API's. Well worth using. I wrote an application a couple of years ago to do all the date conversion and validation I need, and it hums along, year after year. No maintenance, so far, even.
On June '98 MC Magazine published such utility "Dressing Up Your Dates".