Previous Topic: /FETCH Usage NotesNext Topic: /IAS Command


/GVAR Command

The /GVAR command adds, updates, or deletes a global variable referenced by a user-defined symbolic name that may be used in a JCL or PARM statement. Global variables are prefixed by a one- to four-character prefix defined by the GVARSUB assignment in the OPTIONS statement.

Global variables reside in the CA WA CA 7 Edition database and remain in effect when CA WA CA 7 Edition is reinitialized. Variable names are user-defined but may not match the list of reserved variables described in the Interface Reference Guide.

The command has the following format:

/GVAR,OPT={ADD|DEL|MOD|UPD},NAME=variable
          [,JOB={jobname|mask|*}]
          [,SCHID={0|nnn|*}]
          [,SYS={systemid|mask|*}]
          [,{VAL|VALUE}=string]
OPT

Specifies the type of operation to be performed.

ADD

Specifies to add a global variable.

DEL

Specifies to delete a global variable. This option will delete multiple matching table entries if one or more JOB, SYS, or SCHID parameters is set to *. Only JOB=*, SYS=*, or SCHID=* will cause multiple deletes to occur with one command. That is, the following command deletes only a single entry with the "specific" generic JOB value of JOB* and not delete TEST variables with JOB=JOBA, JOBB, and so forth:

/GVAR,OPT=DEL,NAME=TEST,JOB=JOB*
MOD

Performs one of the following actions:

  • If the variable exists, this option functions like UPD, and the variable is updated.
  • If the variable does not exist, this option functions like ADD, and the variable is added.
UPD

Specifies to change the value of a global variable.

NAME

Defines the name of a global variable. This is a 1- to 32-character alphanumeric field with no embedded blanks. If more than 32 characters are entered, they are truncated to 32 characters. Special characters are limited to #, $, @, _ and %. Multiple assignments can be made to the same variable name for each combination of JOB, SYSTEM, and SCHID. Lowercase characters are translated to uppercase. Only a specific name is supported for multi-delete. A generic NAME, such as NAME=* is not accepted.

JOB

(Optional) Specifies a job name or mask.

Default: blank

jobname

Defines the job name or mask for job names that will use this specified value of this global variable. If no job name or mask is specified, the VALue is the default substitution value for all jobs. Lowercase characters are translated to uppercase. If more than 8 characters are entered, they are truncated to 8 characters.

*

For OPT=ADD|UPD|MOD, is equivalent to blank. For OPT=DEL, allows multiple deletions of the same NAME with any JOB setting.

SCHID

(Optional) Specifies a schedule ID.

nnn

Defines the CA WA CA 7 Edition schedule ID that will use this specified value of this global variable. If no SCHID is specified, this is the default substitution value for all schedule IDs. The default is 0.

*

For OPT=ADD|UPD|MOD, * is equivalent to 0. For OPT=DEL, * allows multiple deletions of the same NAME with any SCHID setting.

SYS

(Optional) Specifies a system name or mask.

Default: blank

systemid

Defines the system name or mask for system names that will use this specified value of this global variable. If no system name or mask is specified, the VALue is the default substitution value for all systems. Lowercase characters are translated to uppercase. systemid can include leading and embedded blanks without parentheses. Trailing blanks are not significant. If more than 8 characters are entered, they are truncated to 8 characters. Parentheses can be used and are not retained if ( is the first character and ) is the delimiter.

*

For OPT=ADD|UPD|MOD, * is equivalent to blank. For OPT=DEL, * allows multiple deletions of the same NAME with any SYS setting.

VAL|VALUE

(Optional) Specifies the character string to replace the global variable. It is a 1- to 44-character field that can include any printable characters. If more than 44 characters are entered, they are truncated to 44 characters. Embedded and trailing blanks can be included when the entire string is enclosed by parentheses. The system removes the parentheses, which do not count towards the value length. val can include leading and embedded blanks without parentheses, but trailing blanks are counted in the length only if ( is the first character and ) is the delimiter. The keyword can be included for OPT=DEL but is ignored.

Limits: Required when OPT=ADD|UPD|MOD

More Information:

Masking