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.

Here's an example. It's overly-complex and not written the way I would in a "real" program, but it shows that "a solution exists".

signal on syntax
j = 1
ChkDate:
do i = j to 15
  tstDate = '01/' || 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

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