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 GETJV macro transfers the value of a user or special job variable to an area of the user program.
Macro call format and operand description
Operation | Operands |
|
|
jvid
Identifies the job variable. “jvid” can be:
jvname | Fully qualified path name of a permanent or temporary job variable. |
*jvlink | Valid job variable link name. |
start
Start position for output.
length
Output length.
area
Address of an area in the user program to which the value of the job variable is to be transferred. The area is supplied as follows:
Format
|
|
<-4Byte→
<- 1111=total length ----------------->
size
Specifies the size of “area”. It must be at least as long as the “length of the value to be read + 4” and may not be longer than 32767. The actual size of “area”, i.e. the length of the JV value +4, is entered in the first two bytes of the area. If the total length of the job variable value is greater than the maximum value “size - 4”, the job variable value is truncated so that the maximum value is not exceeded.
PASS=password
Read password.
PARMOD=
Controls macro expansion. Either the 24-bit or the 31-bit interface is generated.
PARMOD is evaluated only when VERSION=0 applies.
If PARMOD is not specified here, macro expansion is performed according to the specification for the GPARMOD macro or according to the default setting for the assembler (=24-bit interface)
24
The 24-bit interface is generated. Data lists and instructions use 24-bit addresses. (Address space <=
16 Mb.)
31
The 31-bit interface is generated. Data lists and instructions use 31-bit addresses. (Address space <= 2Gb.) Data lists start with standard header.
MF=
PREFIX=
For a description of the MF and PREFIX operands, see "The MF operand". Their permitted values are indicated at the beginning of the macro description and in the macro call format.
VERSION=
Specifies which version of BS2000 the macro expansion is to be compatible with.
0
Default value; the macro expansion is compatible with JV <=
V8.7.
The operand MF=D/C, which generates a DSECT or CSECT respectively, is not supported by this version (see note on DSECT).
1
The macro expansion is compatible with JV >=
V10.0.
Note
In contrast to the command level, the length 0 may be specified in the parameter list, representing the total job variable length.
Notes concerning the DSECT
Calling the GETJV macro with the operands MF=D and VERSION=1 generates a DSECT for the operand list of the GETJV macro (VERSION=1).
A CSECT/DSECT for the macro with VERSION=0 is generated by calling the macro IDJGE [D][,prefix] [,PARMOD=24/31].
Return information and error flags
see chapter "Macro level".
DSECT
GETJV GETJV MF=D,VERSION=1 1 *********************************************************************** 1 * VERSION 203 1 *********************************************************************** 1 * G E T J V P A R A M E T E R L I S T * 1 *********************************************************************** 1 #INTF REFTYPE=REQUEST, C 1 INTNAME=GETJV,INTCOMP=002 1 GETJV DSECT 1 *********************************************************************** 1 * UNIT=41, FUNCTION=0, VERSION=1 (V9.0) * 1 * VERSION=2 (V10.0) * 1 *********************************************************************** 1 FHDR MF=(C,IDJG) 2 DS 0A 2 IDJGFHE DS 0XL8 0 GENERAL PARAMETER AREA HEADER 2 * 2 IDJGIFID DS 0A 0 INTERFACE IDENTIFIER 2 IDJGFCTU 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 IDJGFCT DS AL1 2 FUNCTION NUMBER 2 IDJGFCTV DS AL1 3 FUNCTION INTERFACE VERSION NUMBER 2 * 2 IDJGRET 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 IDJGSRET DS 0AL2 4 SUB RETURN CODE 2 IDJGSR2 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 IDJGR2OK EQU X'00' All correct, no additional info 2 IDJGR2NA EQU X'01' Successful, no action was necessary 2 IDJGR2WA EQU X'02' Warning, particular situation 2 IDJGSR1 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 IDJGRFSP EQU X'00' FUNCTION SUCCESSFULLY PROCESSED 2 IDJGRPER EQU X'01' PARAMETER SYNTAX ERROR 2 * 3 GLOBALLY DEFINED ISL ERROR CODES IN CLASS X'01' - X'1F' 2 IDJGRFNS EQU X'01' CALLED FUNCTION NOT SUPPORTED 2 IDJGRFNA EQU X'02' CALLED FUNCTION NOT AVAILABLE 2 IDJGRVNA EQU X'03' INTERFACE VERSION NOT SUPPORTED 2 * 2 IDJGRAER EQU X'04' ALIGNMENT ERROR 2 IDJGRIER EQU X'20' INTERNAL ERROR 2 IDJGRCAR EQU X'40' CORRECT AND RETRY 2 * 2 GLOBALLY DEFINED ISL ERROR CODES IN CLASS X'40' - X'7F' 2 IDJGRECR EQU X'41' SUBSYSTEM (SS) MUST BE CREATED 2 * EXPLICITELY BY CREATE-SS 2 IDJGRECN EQU X'42' SS MUST BE EXPLICITELY CONNECTED 2 * 2 IDJGRWAR EQU X'80' WAIT FOR A SHORT TIME AND RETRY 2 IDJGRWLR EQU X'81' " LONG " 2 IDJGRWUR 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 IDJGRTNA EQU X'81' SS TEMPORARILY NOT AVAILABLE 2 IDJGRDH EQU X'82' SS IN DELETE / HOLD 2 * 2 IDJGMRET DS 0AL2 6 MAIN RETURN CODE 2 IDJGMR2 DS AL1 6 MAIN RETURN CODE 2 2 IDJGMR1 DS AL1 7 MAIN RETURN CODE 1 2 * 2 * SPECIAL LAYOUT OF LINKAGE_MAIN_RETURN_CODE (YYYY IN X'00XXYYYY') 2 * 2 IDJGRLNK EQU X'FFFF' LINKAGE ERROR / REQ. NOT PROCESSED 2 IDJGFHL EQU 8 8 GENERAL OPERAND LIST HEADER LENGTH 2 * 1 *********************************************************************** 1 * END OF STANDARD HEADER. START OF SPECIAL GETJV PARAMETER LIST * 1 *********************************************************************** 1 IDJGHDRI EQU X'00290002',4 1 IDJGAR31 DS A AREA ADDRESS(31 BIT FORMAT) 1 IDJGSIZE DS H AREA SIZE 1 IDJGJV DS CL54 JVNAME 1 IDJGPOS DS H SUBSTRING START POSITION 1 IDJGLEN DS H SUBSTRING LENGTH 1 IDJGPASS DS CL4 PASSWORD 1 DS XL12 1 IDJGFLAG DS X FLAGS 1 IDJGENCR EQU X'80' 7-7 0=YES, 1=NO 1 * (ENCRYPTION) 1 IDJGFGNV EQU X'40' 6-6 0=NO, 1=YES 1 * (NUMERIC-VALUE) 1 IDJGJVIX EQU X'20' 5-5 0=NO, 1=YES 1 * (JVID INDEXED (SUBSTRING) ) 1 IDJGP2 EQU X'10' 4-4 0=P1 CALLER,1=P2 CALLER 1 IDJGECT EQU X'08' 3-3 1=SET BY CMD PROCESSING 1 IDJGFGBV EQU X'04' 2-2 0=NO, 1=YES 1 * (BOOLEAN-VALUE) 1 IDJGNSTR EQU X'02' 1-1 0=NO, 1=YES 1 * (NULLSTRING DEFINED) 1 DS XL3 1 IDJGJVS DS A RESERVED 1 IDJGPLLN EQU *-GETJV LENGTH OF DSECT 1 *********************************************************************** 1 SPACE