General
Domain: | Job variables |
Macro type: | Type S (standard form/C/D/E/L form) see section “The MF operand” |
In the C and D forms of the macro, a prefix (PREFIX = pre, where pre is 1..3 letters) can be specified (see section “The PREFIX operand”). | |
Default value: | PREFIX=IDJ |
Macro description
The COPJV macro copies the contents of a job variable (send JV) into another job variable (receive JV). If required, the protection properties of the send JV can also be copied along with the contents, apart from an existing MONJV or CJC protection.
Both permanent and temporary JVs can be copied. Read access must be allowed for the send JV and write access must be allowed for the receive JV. If the receive JV does not exist it is created, whereby when creating a permanent JV, the maximum number allowed in the user entry cannot be exceeded (see also CREATE-JV command).
Privileged functions:
The system administrator (TSOS privilege) is the co-owner of all job variables by default (can therefore also create and copy job variables under all user IDs).
This co-ownership can be restricted for permanent job variables.
Macro call format and operand description
Operation | Operands |
|
|
<jvname1>
Name of the job variable to be copied (send JV).
Read access must be allowed (with a JV under a foreign user ID, either USER-ACCESS=ALL-USERS must exist or read rights via BASIC-ACL or GUARDS, or co-ownership).
<jvname2>
Name of the job variable into which copying is to be done (receive JV).
If the receive JV is not cataloged, it is created. In this case, you can only specify your own ID or one for which you are co-owner.
If the receive JV is cataloged, write access must be allowed (for a JV under a foreign user ID, either standard access control with USER-ACCESS=*ALL-USERS must exist or write rights via BASIC-ACL or GUARDS, or co-ownership).
However, the receive JV will only be overwritten if REPLACE=*YES (default) is specified.
SAME=
Specifies whether the protection properties of the send JV are also to apply for the receive JV.
*NO
The protection properties are not taken over to the receive JV. If a receive JV is newly created, the system default values are set for the protection properties (see also the CREATE-JV command default settings). The previous protection properties remain intact for a receive JV that already exists.
*YES
The receive JV is given the same protection properties as the send JV (regarding ACCESS, USER-ACCESS, OWNER, GROUP, OTHERS, EXPIR-DATE, EXPIR-TIME, MAN-CLASS, negotiated GUARDS, and the same passwords; see also the output fields of the SHOW-JV-ATTRIBUTES command).
However, an existing MONJV or CJC protection is not taken over.
Specifying PROTECTION=*SAME is ignored in the following cases (i.e. *NO applies):
The receive JV is a temporary JV.
The receive JV is being used by CJC.
The receive JV is under a foreign ID and the caller is not a coowner.
If the send JV is on a foreign user ID and protected with BASIC-ACL or GUARDS, the properties USER-ACCESS, BASIC-ACL and GUARDS of the receive JV are set to default values.
WRITE=
Specifies whether an existing receive JV is to be overwritten.
*REPLACE
An existing receive JV is overwritten without any message.
*NEW
An existing receive JV is not overwritten. The command is rejected.
The error handling is triggered in procedures (spin-off mechanism in non-S procedures or SDF-P error handling in S procedures).
MF=
PREFIX=
For a description of the MF and PREFIX operands, see paragraph "The MF operand" and "The PREFIX operand".
Their permitted values are indicated at the beginning of the macro description and in the macro call format.
Return information and error flags
see paragraph Messages - "Macro level".
DSECT
COPJV COPJV MF=D 1 *********************************************************************** 1 * VERSION 410 1 *********************************************************************** 1 * C O P J V P A R A M E T E R L I S T * 1 *********************************************************************** 1 #INTF REFTYPE=REQUEST, C 1 INTNAME=COPJV,INTCOMP=001 1 COPJV DSECT 1 *********************************************************************** 1 * UNIT=41, FUNCTION=35, VERSION=1 * 1 *********************************************************************** 1 FHDR MF=(C,IDJP) 2 DS 0A 2 IDJPFHE DS 0XL8 0 GENERAL PARAMETER AREA HEADER 2 * 2 IDJPIFID DS 0A 0 INTERFACE IDENTIFIER 2 IDJPFCTU DS AL2 0 FUNCTION UNIT NUMBER 2 * BIT 15 HEADER FLAG BIT, 2 * MUST BE RESET UNTIL FURTHER NOTICE 2 * BIT 14-12 UNUSED, MUST BE RESET 2 * BIT 11-0 REAL FUNCTION UNIT NUMBER 2 IDJPFCT DS AL1 2 FUNCTION NUMBER 2 IDJPFCTV DS AL1 3 FUNCTION INTERFACE VERSION NUMBER 2 * 2 IDJPRET DS 0A 4 GENERAL RETURN CODE 2 * 2 * GENERAL_RETURN_CODE CLEARED (X'00000000') MEANS 2 * REQUEST SUCCESSFUL PROCESSED AND NO ADDITIONAL INFORMATION 2 * 2 IDJPSRET DS 0AL2 4 SUB RETURN CODE 2 IDJPSR2 DS AL1 4 SUB RETURN CODE 2 2 * ALWAYS CLEARED (X'00') IF MAIN_RETURN_CODE IS X'FFFF' 2 * Standard subcode2 values as defined by convention: 2 IDJPR2OK EQU X'00' All correct, no additional info 2 IDJPR2NA EQU X'01' Successful, no action was necessary 2 IDJPR2WA EQU X'02' Warning, particular situation 2 IDJPSR1 DS AL1 5 SUB RETURN CODE 1 2 * 2 * GENERAL INDICATION OF ERROR CLASSES 2 * 2 * CLASS A X'00' FUNCTION WAS SUCCESSFULLY PROCESSED 2 * CLASS B X'01' - X'1F' PARAMETER SYNTAX ERROR 2 * CLASS C X'20' INTERNAL ERROR IN CALLED FUNCTION 2 * CLASS D X'40' - X'7F' NO CLASS SPECIFIC REACTION POSSIBLE 2 * CLASS E X'80' - X'82' WAIT AND RETRY 2 * 2 IDJPRFSP EQU X'00' FUNCTION SUCCESSFULLY PROCESSED 2 IDJPRPER EQU X'01' PARAMETER SYNTAX ERROR 2 * 3 GLOBALLY DEFINED ISL ERROR CODES IN CLASS X'01' - X'1F' 2 IDJPRFNS EQU X'01' CALLED FUNCTION NOT SUPPORTED 2 IDJPRFNA EQU X'02' CALLED FUNCTION NOT AVAILABLE 2 IDJPRVNA EQU X'03' INTERFACE VERSION NOT SUPPORTED 2 * 2 IDJPRAER EQU X'04' ALIGNMENT ERROR 2 IDJPRIER EQU X'20' INTERNAL ERROR 2 IDJPRCAR EQU X'40' CORRECT AND RETRY 2 * 2 GLOBALLY DEFINED ISL ERROR CODES IN CLASS X'40' - X'7F' 2 IDJPRECR EQU X'41' SUBSYSTEM (SS) MUST BE CREATED 2 * EXPLICITELY BY CREATE-SS 2 IDJPRECN EQU X'42' SS MUST BE EXPLICITELY CONNECTED 2 * 2 IDJPRWAR EQU X'80' WAIT FOR A SHORT TIME AND RETRY 2 IDJPRWLR EQU X'81' " LONG " 2 IDJPRWUR EQU X'82' WAIT TIME IS UNCALCULABLY LONG 2 * BUT RETRY IS POSSIBLE 2 * 2 GLOBALLY DEFINED ISL ERROR CODES IN CLASS X'80' - X'82' 2 IDJPRTNA EQU X'81' SS TEMPORARILY NOT AVAILABLE 2 IDJPRDH EQU X'82' SS IN DELETE / HOLD 2 * 2 IDJPMRET DS 0AL2 6 MAIN RETURN CODE 2 IDJPMR2 DS AL1 6 MAIN RETURN CODE 2 2 IDJPMR1 DS AL1 7 MAIN RETURN CODE 1 2 * 2 * SPECIAL LAYOUT OF LINKAGE_MAIN_RETURN_CODE (YYYY IN X'00XXYYYY') 2 * 2 IDJPRLNK EQU X'FFFF' LINKAGE ERROR / REQ. NOT PROCESSED 2 IDJPFHL EQU 8 8 GENERAL OPERAND LIST HEADER LENGTH 2 * 1 *********************************************************************** 1 * END OF STANDARD HEADER. START OF SPECIAL COPJV PARAMETER LIST * 1 *********************************************************************** 1 IDJPHDRI EQU X'00292301',4 1 IDJPFLG DS XL1 FLAG 1 IDJPSAME EQU X'80' 7-7 1=SAME=YES 0=NO 1 IDJPWRIT EQU X'40' 6-6 1=WRITE=NEW 0=REPLACE 1 * 0=DESCRIPTOR GIVEN 1 IDJPRES DS XL3 RESERVED 1 IDJPJV1 DS CL54 JVNAME1 1 IDJPJV2 DS CL54 JVNAME2 1 IDJPJVS DS A RESERVED 1 IDJPPLLN EQU *-COPJV LENGTH OF DSECT 1 *********************************************************************** 1 SPACE