VARSAVE – Save variables in a JCL Variable Table
Use the VARSAVE
command to save
all the variables that are assigned to the tables specified.
VARSAVE [table-1,table-2,...,table-n]
You can specify as many tables as you want. For each table, the command saves any variables
flagged as SAVE(NO)
and update the JCL Variable Table in
HCL Workload Automation for Z.
To update multiple variables in the same table, this is the most effective way because the
command updates all the variables in the same table contemporaneously. Instead,
VARSET
and SAVE(YES)
perform individual table
updates for each specified variable.
Note:
- Variables do not need to exist within a table. They are added to the table, if needed.
- Tables do not need to exist to have variables saved to them. If a table does not exist, it is
created automatically using
OPTIONS OWNER
to set the Owner ID; the description is set to the creating Job Name, Jes Number and current date.
The following
example shows how to create the table MYTABLE and add the variable MYVAR2 to the table.
Note:
VARSET MYVAR2
is to be specified in the statement where you set the TABLE
keyword and the VARSAVE
command must follow the VARSET
command.VARSUB SCAN
VARSET MYVAR1 VALUE(16)
VARSET MYVAR2 @V(MYVAR1) SAVE(NO) TABLE(MYTABLE)
VARSAVE MYTABLE