Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

COPY-JV

&pagelevel(3)&pagelevel

Copy job variable

Component:

JV                                                                                                                         

Functional area:

Job variables

Domain:

JOB-VARIABLES

Privileges:

STD-PROCESSING
HARDWARE-MAINTENANCE
SECURITY-ADMINISTRATION
SAT-FILE-MANAGEMENT
SAT-FILE-EVALUATION

This function is available to the user only if the chargeable software product JV has been loaded as a subsystem.

Function

The COPY-JV command copies the content of a job variable (source JV) to another job variable (target JV). Optionally it is possible to copy not only the content but also the protection attributes of the source JV with the exception of any existing MONJV or CJC protection.
Both permanent and temporary job variables can be copied.
Read access must be permitted for the source JV and write access for the target JV. If a target JV does not exist it is created. When a permanent JV is created the maximum permitted number specified in the user entry may not be exceeded (see also the CREATE-JV command).

Privileged functions

Systems support (TSOS privilege) is by default co-owner of all job variables (and can therefore also create or copy job variables under any user ID). This co-ownership can be restricted for permanent job variables if SECOS is used.

Format

COPY-JV

Alias: CPJV

FROM-JV = <filename 1..54 without-gen-vers> / *LINK(...)


*LINK(...)                                                                                                                                     



|

LINK-NAME = <alphanum-name 1..7>

,TO-JV = <filename 1..54 without-gen-vers> / *LINK(...)


*LINK(...)



|

LINK-NAME = <alphanum-name 1..7>

,PROTECTION = *STD / *SAME

,REPLACE-OLD-JV = *YES / *NO

Operands

FROM-JV = <filename 1..54 without-gen-vers>
Name of the job variable which is to be copied (source JV).
Write access must be permitted (for a JV under a foreign user ID either USER-ACCESS=ALL-USERS or read permission via BASIC-ACL or GUARDS or co-ownership must exist).

FROM-JV = *LINK(...)
The source JV is named via a link name.

LINK-NAME = <alphanum-name 1..7> 
Link name of the JV.

TO-JV = <filename 1..54 without-gen-vers> 
Name of the job variable which is to be copied to (target JV).
If the target JV is not yet cataloged, it is created. In this case only the user’s own user ID may be specified or a user ID for which the user is co-owner.
If the target JV is cataloged, write access must be permitted (in the case of a JV under a foreign user ID, either the standard access control must exist with USER-ACCESS= *ALL-USERS or write permission via BASIC-ACL or GUARDS or co-ownership). However, the target JV is overwritten only if REPLACE=*YES is specified (default).

TO-JV = *LINK(...)
The target JV is named via a link name.

LINK-NAME = <alphanum-name 1..7> 
Link name of the JV.

PROTECTION = *STD / *SAME
Specifies whether the protection attributes of the source JV are also to apply for the target JV.
If MONJV or CJC protection exists for the source JV, this is not taken over.

PROTECTION = *STD
The protection attributes are not applied to the target JV. If the target JV is to be newly created, it will be assigned the system defaults as protection attributes (see also the defaults of the CREATE-JV command). The existing protection attributes are retained if the target JV already exists.

PROTECTION = *SAME
The target JV is assigned the same protection attributes as the source JV (i.e. for ACCESS, USER-ACCESS, OWNER, GROUP, OTHERS, EXPIR-DATE, EXPIR-TIME, MAN-CLASS, defined GUARDS, and the same passwords; see also the output fields of the SHOW-JV-ATTRIBUTES command). If MONJV or CJC protection exists it is not taken over.
The PROTECTION=*SAME specification is ignored in the following cases (i.e. *STD applies):

  • The target JV is a temporary JV.

  • CJC protection exists for the target JV.

  • The target JV resides under a foreign user ID and the caller is not a co-owner.

As management classes are pubset-specific they can only be taken over if the source and target JVs reside on the same pubset. When copying to another pubset an existing target JV retains its management class; a new target JV is assigned MANAGEMENT-CLASS=*NONE (as with PROTECTION=*STD).
In the case of a source JV which resides under a foreign ID and is protected with BASIC-ACL or GUARDS, the protection attributes USER-ACCESS, BASIC-ACL and GUARDS are set to the system defaults (see the CREATE-JV command).

REPLACE-OLD-JV = *YES / *NO 
Specifies whether an existing target JV is to be overwritten.

REPLACE-OLD-JV = *YES
An existing target JV is overwritten without any message being issued.

REPLACE-OLD-JV = *NO
An existing target JV is not overwritten. The command is rejected. In procedures error handling is triggered (spin-off mechanism in non-S procedures or SDF-P error handling in S procedures).

Return codes

(SC2)

SC1

Maincode

Meaning/Guaranteed messages


0

CMD0001

Command executed

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

1 Downloading1

1 Downloading1