Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

VALIDDATE

Example

VALIDDATE returns a '1'B if the string d holds a date/time value that matches the pattern p.

Read syntax diagramSkip visual syntax diagram>>-VALIDDATE-(-d--+-----------+-)------------------------------><
                  '-,p-+----+-'
                       '-,w-'
 
d
A string expression representing a date.

d specifies the input date as a character string representing date/time according to the pattern p.

d must have computational type and should have character type. If not, d is converted to character.

p
One of the supported date/time patterns.

If present, it specifies the date/time pattern of d. If p is missing, it is assumed to be the default date/time pattern of 'YYYYMMDDHHMISS999'.

p must have computational type and should have character type. If not, it is converted to character.

w
Specifies an expression (such as 1950) that can be converted to an integer. If negative, it specifies an offset to be subtracted from the value of the year when the code runs. If omitted, w defaults to the value specified in the WINDOW compile-time option.

Allowable patterns are listed in Table 50. For an explanation of Lilian format, see Date/time built-in functions.

If the pattern contains punctuation characters, VALIDDATE will not check that the input string contains matching characters. So, for example, for the pattern YYYY-MM-DD, VALIDDATE will accept both 2008-03-14 and 2008.13.14 etc.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)