z/OS TSO/E REXX User's Guide
|
Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Testing Input with Built-In Functions z/OS TSO/E REXX User's Guide SA32-0982-00 |
|
|
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, the exec requests
a dollar amount with the following instructions.
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:
Other useful built-in functions to test input are WORDS, VERIFY, LENGTH, and SIGN.
|
Copyright IBM Corporation 1990, 2014 |