Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

GETVAR

&pagelevel(4)&pagelevel

The GETVAR macro reads the contents of a variable. GETVAR can be used with simple variables and elements of complex variables.

Operation

Operands

GETVAR

MF = E
,PARAM = <name 1..8> / (<integer 1..15> )

MF = D

,PREFIX = G / prefix

MF = C

,PREFIX = G / prefix

,MACID = ETV / macid

MF = L

,NAMLEN = <integer 1..255>

,NAMADR = <name 1..8>

,SCOPE = *VISIBLE / *TASKONLY

,MAXLEN = <integer 1..4096>

,VALADR = <name 1..8>

Operands

MF = E
Execute format of the macro call; generates an SVC.

PARAM
Designates the address of the operand list that is evaluated for the macro call (address of macro call with MF = L).

= <name 1..8>
Designates the symbolic address of the operand list.

= (<integer 1..15>)
Designates the register that contains the address of the operand list.

MF = D
DSECT format of the macro call; generates a DSECT for the operand list. The names generated begin with the letter G; they can be modified with PREFIX.

PREFIX = G /prefix
Defines the first character of the generated names.
Default: the generated names begin with the letter G.

MF = C
C format of the macro call; generates an operand list whose symbolic names begin with the string GETV. They can be changed with PREFIX and MACID.

PREFIX = G /prefix
Defines the first character of the generated names.
Default: the generated names begin with the letter G.

MACID = ETV / macid
A string of up to three characters that replaces characters 2 to 4 of the generated names. Default: ETV

MF = L
LIST format of the macro call; generates the operand list for the macro call with MF = E (Execute format); the macro call must be addressable by means of a symbolic address.

NAMLEN = <integer 1..255>
Designates the length of the variable name.

NAMADR = <name 1..8>
Symbolic address of a field containing the variable name.

SCOPE
Designates the scope of the variable.

= *VISIBLE
The variable is a procedure-local variable

= *TASKONLY
The variable is a task-global variable.

MAXLEN = <integer 1..4096>
Designates the length of the field specified as VALADR and thus the maximum length of the variable value.

VALADR = <string 1..8>
Symbolic address of the field to which the variable value to be read is transferred.

Return codes

The table below lists the return codes in hexadecimal notation.

Subcode2

Subcode1

Maincode

Meaning

00000000Macro call was successful; no errors
00010001Parameter error
00010002Syntax error in variable name
00400003Area too small
00400004Variable not declared
00400005Variable container not available
00400006Data type and variable value do not match
00400008Variable has no value
0001FFFFUnknown unit or function number
0002FFFFFunction not available
0003FFFFWrong version of operand list