Binary
returns 1if string contains only the characters 0or 1or both.
Creturns 1if string is a mixed SBCS/DBCS string.
Dbcs returns 1if string is a DBCS-only string enclosed by SO and SI bytes.
Lowercase
returns 1if string contains only characters from the range az.
Mixed case
returns 1if string contains only characters from the ranges azand AZ.
Number
returns 1if string is a valid REXX number.
Symbol
returns 1if string contains only characters that are valid in REXX symbols. (See page 112.) Note
that both uppercase and lowercase alphabetics are permitted.
Uppercase
returns 1if string contains only characters from the range AZ.
Whole number
returns 1if string is a REXX whole number under the current setting of NUMERIC DIGITS.
heXadecimal
returns 1if string contains only characters from the ranges af,AF,09, and blank (as long as
blanks appear only between pairs of hexadecimal characters). Also returns 1if string is a null
string, which is a valid hexadecimal string.
Here are some examples:
DATATYPE(' 12 ') -> 'NUM'
DATATYPE('') -> 'CHAR'
DATATYPE('123*') -> 'CHAR'
DATATYPE('12.3','N') -> 1
DATATYPE('12.3','W') -> 0
DATATYPE('Fred','M') -> 1
DATATYPE('','M') -> 0
DATATYPE('Fred','L') -> 0
DATATYPE('?20K','s') -> 1
DATATYPE('BCd3','X') -> 1
DATATYPE('BC d3','X') -> 1
Note: The DATATYPE function tests the meaning or type of characters in a string, independent of the
encoding of those characters (for example, ASCII or EBCDIC).
DATE
 DATE(
option
) 
returns, by default, the local date in the format: dd mon yyyy (day month year—for example, 13 Mar 1992),
with no leading zero or blank on the day. If the active language has an abbreviated form of the month
name, then it is used (for example, Jan,Feb, and so on).
You can use the following options to obtain specific formats. (Only the capitalized and highlighted letter is
needed; all characters following it are ignored.)
Base returns the number of complete days (that is, not including the current day) since and including the
Functions
Chapter 14. Functions 181