On 3 Mar 2008 12:02:32 -0800, in bit.listserv.ibm-main (Message-ID:<[EMAIL PROTECTED]>) [EMAIL PROTECTED] (Arthur T.) wrote:

On Mon, 3 Mar 2008 06:50:22 -0800 (PST), in bit.listserv.ibm-main (Message-ID:<[EMAIL PROTECTED]>) [EMAIL PROTECTED] wrote:

2.    valDate = DATE('E',StartDate,'E')
I want to validate a user-supplied date is in the correct format
without the rexx failing if it's invalid.

This may not be the best way to validate. Check out the results of the following, which is a very slightly modified version of my previous example. At least on my PC with Regina REXX, it gives unexpected results.

signal on syntax
j = 1
ChkDate:
do i = j to 15
  tstDate = '31/' || right(i,2,0) || '/08'
  valDate = DATE('E',tstDate,'E')
  say valdate 'is valid'
end
exit 0
syntax:
say tstDate 'is not valid'
j = i + 1
signal on syntax
signal ChkDate

Would someone please verify if z/OS (or any other) REXX yields "not valid" for any month numbers other than 2, 13, 14, or 15? Those are the only ones invalid in my test.


--
I cannot receive mail at the address this was sent from.
To reply directly, send to ar23hur "at" intergate "dot" com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to