Assign link name to job variable
Component: | JV |
Functional area: | Job variables |
Domain: | JOB-VARIABLES |
Privileges: | STD-PROCESSING |
Routing code: | $ (with NBCONOPI=N) or J (with NBCONOPI=Y) |
This function is available to the user only if the chargeable software product JV has been loaded as a subsystem.
Function
The SET-JV-LINK command allows the user to assign a link name to a job variable. This assignment is entered into the JV-LINK table associated with the job. A link name is always assigned uniquely to a job variable, but more than one link name can be assigned to a single job variable.
If the specified job variable does not exist, it is created provided no other user ID has been specified (implicit CREATE-JV).
Using link names enables the names of the job variables used to be kept variable in programs and procedures (e.g. no specific name or user ID needs to be defined). Before invoking the program or procedure, the user creates JV-LINK entries with the specified link names for the job variables that are to be used.
A JV-LINK entry exists up to the end of the job, unless it is deleted beforehand with the REMOVE-JV-LINK command. The entries can be displayed using the SHOW-JV-LINK command.
Default link names
For a job-monitoring job variable, a JV-LINK entry with the link name SMONJVJ is automatically created. Similarly, a program-monitoring job variable is assigned the link name SMONJVP. This enables a job or program to access its monitoring job variable. Users should not use these default link names for their own JV-LINK entries.
Privileged functions
If systems support (TSOS and OPERATING privileges) specifies a non-existent job variable with a foreign user ID, the job variable is created under this ID. Co-ownership of TSOS can be restricted for permanent job variables when SECOS is used.
Format
SET-JV-LINK | Alias: STJVL |
LINK-NAME = *NONE / <alphanum-name 1..7> ,JV-NAME = <filename 1..54 without-gen-vers> |
Operands
LINK-NAME = *NONE / <alphanum-name 1..7>
Link name. The JV can be accessed under this name within the currently executing job. The assignment between link name and JV name is registered in the JV-LINK table for the job.
Only one entry per link name may be present in the JV-LINK table. One JV can however be assigned to more than one link name.
If the specified link name was already assigned to another JV, the old assignment is replaced by the new assignment.
JV-NAME = <filename 1..54 without-gen-vers>
Name of the JV.
If the JV already exists, the user must have access authorization.
If the JV does not yet exist, only the user’s own ID may be specified. The JV is cataloged with the default attributes of the CREATE-JV command.
Return codes
(SC2) | SC1 | Maincode | Meaning |
---|---|---|---|
0 | CMD0001 | Command executed | |
1 | 0 | CMD0001 | No action necessary |
2 | 0 | CMD0001 | Command executed with a warning |
1 | CMD0202 | Syntax error | |
32 | CMD0221 | System error | |
64 | JVS04E0 | Command not executable in the call environment; if possible, remove cause of error (see SYSOUT message JVS04xx) | |
130 | JVS04E1 | Command cannot be executed at this time; for cause see SYSOUT message JVS04xx | |
130 | CMD2282 | Subsystem JV not available for indefinite time |
Example
For an example see the SHOW-JV-LINK command.