z/OS TSO/E REXX User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Exposing Variables with PROCEDURE EXPOSE

z/OS TSO/E REXX User's Guide
SA32-0982-00

To protect all but specific variables, use the EXPOSE option with the PROCEDURE instruction, followed by the variables that are to remain exposed to the subroutine.

Example Using PROCEDURE EXPOSE

/****************************** REXX *******************************/
/* This exec uses a PROCEDURE instruction with the EXPOSE option to*/
/* expose one variable, number1, in its subroutine.  The other     */
/* variable, number2, is set to null and displays its name in      */
/* uppercase.                                                      */
/*******************************************************************/
 number1 = 10
 CALL subroutine
 SAY number1 number2                        /* displays 7  NUMBER2 */
 EXIT

 subroutine: PROCEDURE EXPOSE number1
 number1 = 7
 number2 = 5
 RETURN

For more information about the PROCEDURE instruction, see z/OS TSO/E REXX Reference.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014