Using Functions; Using Variables - IBM TSO/E REXX User Manual

Table of Contents

Advertisement

CLIST
Separating statements within a line
No more than one statement per line
Character set of statements
Must be in uppercase
Comments
Enclose between /* */, closing delimiter optional at the end of a line.

Using Functions

CLIST
Calling a function
&FUNCTION(expression)
SET A = &LENGTH(ABCDE) /* &A = 5 */

Using Variables

CLIST
Assigning value to a variable
SET statement
SET X = 5
/* &X gets the value 5
SET NUMBER = &X /* &NUMBER gets the value 5 */
SET Y = NUMBER /* &Y gets the value NUMBER */
REXX
Separating instructions within a line
Use ;
do 5; Say 'Hello'; end
Character set of instructions
Can be upper, lower, or mixed case
Comments
Enclose between /* */, closing delimiter
always required.
REXX
Calling a function
function(arguments)
a = length('abcde') /* a = 5 */
REXX
Assigning value to a variable
assignment instruction
*/
x = 5
NUMBER = x
Y = 'number'
Appendix C. Comparisons Between CLIST and REXX
/* X gets the value 5
/* NUMBER gets the value 5 */
/* Y gets the value number */
Syntax
*/
203

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents