IBM SC34-5764-01 Server User Manual


 
Built-in Functions
REXX provides a rich set of built-in functions, including character manipulation, conversion, and
information functions.
Other built-in and external functions are generally available—see section “External Functions Provided in
REXX/CICS” on page 200.
The following are general notes on the built-in functions:
v The parentheses in a function are always needed, even if no arguments are required. The first
parenthesis must follow the name of the function with no space in between.
v The built-in functions work internally with NUMERIC DIGITS 9 and NUMERIC FUZZ 0 and are
unaffected by changes to the NUMERIC settings, except where stated. Any argument named as a
number is rounded, if necessary, according to the current setting of NUMERIC DIGITS (just as though
the number had been added to 0) and checked for validity before use. This occurs in the following
functions: ABS, FORMAT, MAX, MIN, SIGN, and TRUNC, and for certain options of DATATYPE. This is
not true for RANDOM.
v Any argument named as a string may be a null string.
v If an argument specifies a length, it must be a positive whole number or zero. If it specifies a start
character or word in a string, it must be a positive whole number, unless otherwise stated.
v Where the last argument is optional, you can always include a comma to indicate you have omitted it;
for example, DATATYPE(1,), like DATATYPE(1), would return NUM. You can include any number of trailing
commas; they are ignored. (Where there are actual parameters, the default values apply.)
v If you specify a pad character, it must be exactly one character long. (A pad character extends a string,
usually on the right. For an example, see the LEFT built-in function on page 188.)
v If a function has an option you can select by specifying the first character of a string, that character can
be in upper- or lowercase.
v A number of the functions described in this chapter support DBCS. A complete list and descriptions of
these functions are in Appendix C, “Double-Byte Character Set (DBCS) Support,” on page 395.
Functions
174
CICS TS for VSE/ESA: REXX Guide