Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Creating arithmetic expressions from user-supplied input - the CALC CLIST z/OS TSO/E CLISTs SA32-0978-00 |
|
The CALC CLIST, shown in Figure 1, contains
a PROC statement that requires three input strings from the invoker:
The CLIST creates an arithmetic expression using the positional parameter variables that represent these three values. A WRITE statement displays a message made up of the unevaluated expression, an equal sign, and the evaluated expression. CALC contains no validity-checking statements; therefore, input that does not meet the above requirements causes the &EVAL; built-in function to fail and generate an error code. Figure 1. The CALC CLIST
|
Copyright IBM Corporation 1990, 2014
|