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


SYSREF statement

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

Use the SYSREF statement in a subprocedure to identify the names of variables, passed from the caller, whose values the subprocedure can reference and modify. When you assign a new value to a SYSREF variable, the new value is retroactive; that is, the new value takes effect both in the caller and in the subprocedure.

On the SYSREF statement in the subprocedure, list the PROC statement parameter that corresponds to the variable name that the caller passed. The SYSREF statement must precede any subprocedure statement that uses its variables.

Read syntax diagramSkip visual syntax diagram
>>-+--------+--SYSREF--+-----------------------------+---------><
   '-label:-'          |            .--------------. |   
                       |            V              | |   
                       '-variable_1---+----------+-+-'   
                                      '-variable-'       

label
A name the CLIST can reference in a GOTO statement to branch to this SYSREF statement. label is one-to-31 alphanumeric characters, beginning with an alphabetic character.
variable_1 / variable
The name of a parameter from the PROC statement. The parameters correspond to variable names that were passed to the PROC statement. Ampersands (&) are optional on the variable name.

In the following example, the subprocedure assigns a new value to the variable whose name was passed (B). The new value (GEORGE) replaces the variable's old value (AL) in the caller. ikjb80c2

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014