z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Variable scope

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

When the REXX program is initialized and the SYSCALL environment is established, the predefined variables are set up. If you call an internal subroutine that uses the PROCEDURE instruction to protect existing variables by making them unknown to that subroutine (or function), the predefined variables also become unknown. If some of the predefined variables are needed, you can either list them on the PROCEDURE EXPOSE instruction or issue another syscalls('ON') to reestablish the predefined variables. The predefined variables are automatically set up for external functions and subroutines. For example:
subroutine: procedure
junk = syscalls('ON')
parse arg dir
'readdir (dir) dir. stem.'

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014