GLOBALV PUT (REXX)
Syntax
GLOBALV PUTT|PUTC .-----------. V | >>-'--GLOBALV-- --+-PUTT-+------ variable-+----'--------------->< '-PUTC-'
Purpose of Command
Use the GLOBALV PUTT or PUTC command to set a task or common global variable from a REXX or NetView® command list. The GLOBALV PUTT or PUTC command creates a task or common global variable with the specified variable name and places it in the task or common global variable dictionary.
When a GLOBALV PUTT or PUTC command is processed, the NetView program determines if a REXX or NetView command list language variable exists with the specified variable name. If a variable with the same name exists, the task or common global variable is created and its value is set to the value currently assigned to the variable.
To delete the value of a task or common global variable, set the value of the variable name to NULL (") and use the GLOBALV PUT command to replace the value. A GLOBALV GET request for the variable causes a null value to be returned.
If a NetView command list language variable with the specified variable name does not exist, a task or common global variable with the specified name is not created. Any attempt to retrieve the variable causes a null value to be returned.
The function of the GLOBALV PUT command is influenced by any previous &TGLOBAL, &CGLOBAL, or GLOBALV defined command issued within the same NetView command list for the same named variable. For example, if a variable has been defined as common (&CGLOBAL variable), a subsequent GLOBALV PUTT variable moves the common global value to the task global variable by that name instead of moving a value from the NetView command list language variable. Refer to the IBM Tivoli NetView for z/OS Programming: REXX and the NetView Command List Language for more information about &TGLOBAL and &CGLOBAL.
If a task or common global variable exists with the specified variable name, the value of the task or common global variable is updated in the global variable dictionary.
For example, a command list accesses a common global variable and, before that command list updates the variable, another command list running under a different task accesses the variable. If both command lists update the variable, the variable assumes the value given to it by the command list that updates it last.
To avoid problems with having a common global variable updated by different command procedures at the same time, you can use PIPE VARLOAD, which can compare and set a variable at one time. See the section about UPDCGLOB (CNME1080) for an example use of VARLOAD.
Refer to IBM Tivoli NetView for z/OS Programming: REXX and the NetView Command List Language for examples about using common global variables. Refer to IBM Tivoli NetView for z/OS Programming: Pipes for usage of VARLOAD.
The command lists in GLOBALV (REXX) show how to put, get, and update a task global variable.
Operand Descriptions
- PUTT or PUTC
- Indicates that task or common global variables with the specified variable names are put into the task or common global variable dictionary.
- variable
- For REXX, specifies the 1 – 31–character name or names of the task or common global variables to be put. For NetView command list language, specifies the 1 – 11 character name or names of the task or command global variables to be put. See Usage Notes for a list of the characters you can use for a variable name. Variables can be separated by either a space or a comma.
Restrictions
For REXX, the instruction is enclosed in single quotation marks to prevent variable substitution.
Coding variables for GLOBALV PUT
'GLOBALV PUTT VAR1 VAR2 VAR3'
'GLOBALV PUTC VARY1,VARY2,VARY3'
'GLOBALV PUTT VARIABLE_A VARIABLE_B VARIABLE_C'
'GLOBALV PUTC VARIABLE_X,VARIABLE_Y,VARIABLE_Z'
