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


Using the NGLOBAL statement

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

The NGLOBAL statement names variables that all the subprocedures in a CLIST can use. The following subprocedure (ABC) defines variables A, B, and C and uses the NGLOBAL statement to make them available to other subprocedures in the CLIST:
ABC: PROC 0                 /* In subprocedure ABC,
NGLOBAL A,B,C               /* define NGLOBAL variables
SET A = apples
SET B = bananas
SET C = cantaloup
SYSCALL XYZ                 /* call subprocedure XYZ
END

XYZ: PROC 0                 /* In subprocedure XYZ,
WRITE Mix &A, &B, and &C    /* use the NGLOBAL variables
END

The NGLOBAL statement must precede any statement that uses its variables. The number of variables that you can name on the NGLOBAL statement is unlimited.

For another example of using the NGLOBAL statement with subprocedures, see Allocating a data set with LISTDSI information - the EXPAND CLIST.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014