EasyManuals Logo

IBM TSO/E REXX User Manual

IBM TSO/E REXX
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #84 background imageLoading...
Page #84 background image
Function Description
BITXOR Returns a string composed of the two input strings eXclusive ORed
together, bit by bit.
CONDITION Returns the condition information, such as name and status, associated
with the current trapped condition.
DATE Returns the date in the default format (dd mon yyyy) or in one of various
optional formats.
ERRORTEXT Returns the error message associated with the specified error number.
EXTERNALS * Returns the number of elements in the terminal input buffer. In TSO/E,
this function always returns a 0.
LINESIZE * Returns the current terminal line width minus 1.
QUEUED Returns the number of lines remaining in the external data queue at the
time when the function is invoked.
SOURCELINE Returns either the line number of the last line in the source file or the
source line specified by a number.
TIME Returns the local time in the default 24-hour clock format (hh:mm:ss)or
in one of various optional formats.
TRACE Returns the trace actions currently in effect.
USERID * Returns the TSO/E user ID, if the REXX exec is running in the TSO/E
address space.
VALUE Returns the value of a specified symbol and optionally assigns it a new
value.
XRANGE Returns a string of all 1-byte codes (in ascending order) between and
including specified starting and ending values.
* Indicates a non-SAA built-in function provided only by TSO/E.
Testing Input with Built-In Functions
Some of the built-in functions provide a convenient way to test input. When an
interactive exec requests input, the user might respond with input that is not valid.
For instance, in the example Using Comparison Expressions on page 31, the exec
requests a dollar amount with the following instructions.
SAY 'What did you spend for lunch yesterday?'
SAY 'Please do not include the dollar sign.'
PARSE PULL last
If the user responds with a number only, the exec will process that information
correctly. If the user responds with a number preceded by a dollar sign or with a
word, such as nothing, the exec will return an error. To avoid getting an error, you
can check the input with the DATATYPE function as follows:
DO WHILE DATATYPE(last) \= 'NUM'
SAY 'Please enter the lunch amount again.'
SAY 'The amount you entered was not a number without a dollar sign.'
PARSE PULL last
END
Other useful built-in functions to test input are WORDS, VERIFY, LENGTH, and
SIGN.
Exercise - Writing an Exec with Built-In Functions
Write an exec that checks a data set member name for a length of 8 characters. If
a member name is longer than 8 characters, the exec truncates it to 8 and sends
Built-In Functions
66
z/OS V1R1.0 TSO/E REXX Users Guide

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM TSO/E REXX and is the answer not in the manual?

IBM TSO/E REXX Specifications

General IconGeneral
BrandIBM
ModelTSO/E REXX
CategoryComputer Hardware
LanguageEnglish

Related product manuals