Built-In Functions; Arithmetic Functions; Comparison Functions - IBM TSO/E REXX User Manual

Table of Contents

Advertisement

Built-In Functions

Over 50 functions are built into the language processor. The built-in functions fall
into the following categories:
v Arithmetic functions
v Comparison functions
v Conversion functions
v Formatting functions
v String manipulating functions
v Miscellaneous functions
The following tables briefly describe the functions in each category. For a complete
description of these functions, see z/OS TSO/E REXX Reference.

Arithmetic Functions

Comparison Functions

These functions evaluate numbers from the argument and return a particular
value.
These functions compare numbers and/or strings and return a value.
These functions convert one type of data representation to another type of data
representation.
These functions manipulate the characters and spacing in strings supplied in the
argument.
These functions analyze a string supplied in the argument (or a variable
representing a string) and return a particular value.
These functions do not clearly fit into any of the other categories.
Function
Description
ABS
Returns the absolute value of the input number.
DIGITS
Returns the current setting of NUMERIC DIGITS.
FORM
Returns the current setting of NUMERIC FORM.
FUZZ
Returns the current setting of NUMERIC FUZZ.
MAX
Returns the largest number from the list specified, formatted according
to the current NUMERIC settings.
MIN
Returns the smallest number from the list specified, formatted according
to the current NUMERIC settings.
RANDOM
Returns a quasi-random, non-negative whole number in the range
specified.
SIGN
Returns a number that indicates the sign of the input number.
TRUNC
Returns the integer part of the input number, and optionally a specified
number of decimal places.
Function
Description
COMPARE
Returns 0 if the two input strings are identical. Otherwise, returns the
position of the first character that does not match.
DATATYPE
Returns a string indicating the input string is a particular data type, such
as a number or character.
Built-In Functions
Chapter 5. Using Functions
63

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents