z/OS TSO/E CLISTs
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Forcing arithmetic evaluations - &EVAL

z/OS TSO/E CLISTs
SA32-0978-00

On most statements, the appearance of arithmetic expressions results in evaluations of those expressions when a CLIST executes the statements. However, on the WRITE statement, you must explicitly instruct a CLIST to evaluate an arithmetic expression by using the &EVAL built-in function. For example, to create a WRITE statement that adds two variables, &FNUM and &SNUM, and displays the results, code the following:
WRITE &FNUM + &SNUM = &EVAL(&FNUM+&SNUM)
Assuming &FNUM is four and &SNUM is three, the CLIST displays the following message:
4 + 3 = 7

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014