External REXX functions

This section describes the REXX external functions that you can use when writing REXX procedures to enhance a File Manager function. In addition, File Manager provides access to the REXX internal functions described in the z/OS TSO/E REXX Reference.

CHANGE
Changes a specified character string.
CHG_OUT
(Can be used in FASTREXX procedures.) Changes a character string in the output record.
CHG_VAR
(Can be used in FASTREXX procedures.) Changes one or more occurrences of an old string in a variable to a new string.
CONTAINS
Checks for character values in a specified string.
FLD
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Refers to a field from the current input record.
FLD_CO
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Searches a field in the input record for one or more occurrences of a string, or tests a field in the input record for one more numeric values.
FLD_OUT
(Can be used in FASTREXX procedures.) Overlays the output record with a field from the input record.
FLD_TM
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Tests selected bits of a field in the input record.
FLD_TYPE
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Tests the data type of a field in the input record.
FLDI
(Can be used in FASTREXX procedures.) Performs a conditional test against an input record field.
FLDO
(Can be used in FASTREXX procedures.) Performs a conditional test against an output record field.
I_LENGTH
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Returns the length of the input record.
MOD_DATE
(Can be used in FASTREXX procedures.) Sets, increments, or decrements a date field using year, month, or day values.
NCONTAIN
Checks for numeric values in a specified string.
O_LENGTH
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Returns the current length of the output record.
OFLD_CO
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Searches a field in the output record for one or more occurrences of a string, or tests a field in the output record for one more numeric values, and resets the current output relative position (OUTPOS) accordingly.
OVLY_OUT
(Can be used in FASTREXX procedures.) Overlays the output record with a literal (constant) or variable value.
OVLY_VAR
(Can be used in FASTREXX procedures.) Overlays the named character variable with a string.
PRINT
Prints a record.
PRTCOUNT
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Returns the count of records printed.
RECSIN
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Returns the count of records read.
RECSOUT
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Returns the count of records written to a given data set.
RSTR_OUT
(Can be used in FASTREXX condition expressions.) Restores the most recently saved copy of the output buffer.
SAVE_OUT
(Can be used in FASTREXX condition expressions.) Saves a copy of the current output buffer.
SET_OLEN
(Can be used in FASTREXX procedures.) Sets the length of the output record.
SETC
(Can be used in FASTREXX procedures.) Defines or changes a character variable.
SETN
(Can be used in FASTREXX procedures.) Defines or changes a numeric variable
TESTC
(Can be used in FASTREXX procedures.) Performs a conditional test against a character variable.
TESTN
(Can be used in FASTREXX procedures.) Performs a conditional test against a numeric variable.
TALLY
(Can be used in FASTREXX procedures.) Totals a field value and reports the total.
TFLD
(Can be used in FASTREXX condition expressions or internally processed criteria expressions.) Searches a field in the input record for one or more occurrences of a string, or tests a field in the input record for one more numeric values. For dimensioned fields, you can search any or all of the elements of the array.
TM
Tests a string for a bit value.
VAR_OUT
(Can be used in FASTREXX procedures.) Overlays the output record with a field from a variable.
VAR_TM
(Can be used in FASTREXX procedures.) Tests selected bits of a field in a variable.
WRITE
(Can be used in FASTREXX procedures.) Writes a record.

The following REXX external functions can only be used with DSEB (Data Set Edit Batch):

BOT
(Can be used in FASTREXX procedures.) Move to the last record
DOWN
(Can be used in FASTREXX procedures.) Move down (forwards) a specified number of records
FINDNEXT
(Can be used in FASTREXX procedures.) Search for a string from the current record forwards
FINDPREV
(Can be used in FASTREXX procedures.) Search for a string from the current record backwards
RECCUR
(Can be used in FASTREXX procedures.) Return the current record number
TOP
(Can be used in FASTREXX procedures.) Move to the first record
UP
(Can be used in FASTREXX procedures.) Move up (backwards) a specified number of records
UPDATE
(Can be used in FASTREXX procedures.) Replace the current input record with the value in OUTREC
The following functions are only valid when used in template criteria for segmented templates.
SEGCNT
(Does not require REXX processing.) Returns the current segment number when identifying segments for a given record.
SEGNO
(Does not require REXX processing.) Returns the previous number of occurrences of a specified segment on the current record.
Note: You can only use these File Manager-specific REXX external functions, and the INREC and OUTREC variables, in a REXX procedure specified by the PROC parameter of a File Manager function (or, when using panels, by the Use REXX proc field). You cannot use these functions and variables in REXX procedures outside of this File Manager environment.