Format Control system functions

Many of the Service Manager system functions are used to create expressions in Format Control. The following is a list of the most commonly used functions:

Function Description
denull() Compresses an array by deleting all trailing NULL entries and returns the compressed array.
index() Returns the index or position number for a specific element value in an array or character in a string. If the target value is not in the array or string, it returns 0 (zero).
lng() Returns the number of elements in an array or structure and the number of characters in a string.
nullsub() Replaces a null value with a known value, eliminating the possibility that expressions will return null or unknown results.
operator() Returns the logon id of the current operator.
str() Converts a non–string data type into a string.
substr() Extracts a substring from a string.
tod() Returns the current date and time.
val() Converts a field into a numeric, logical, or date/time value.

Related topics

Format Control
Using expressions in Format Control
Format Control Boolean (logical) fields
Format Control file variable

Service Manager Programming