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


Sharing variables among subprocedures

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

In addition to passing return codes and variable values, you can define common variables to be shared among different CLISTs, or among subprocedures in a single CLIST.

Variables shared among different CLISTs are called GLOBAL variables. GLOBAL variables are defined using the GLOBAL statement, and are fully described in Nesting CLISTs.

Variables shared by subprocedures in one CLIST are called NGLOBAL (named global) variables. You define named global variables with the NGLOBAL statement. When you define an NGLOBAL variable, any subprocedure in the same CLIST can refer to it by name and modify its value.

The NGLOBAL variables differ from GLOBAL variables in that:
  • They are not global to (shared with) other CLISTs.
  • They are defined by name only (not position).
  • They need to be defined only once.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014