The DELVAR macro deletes a variable. DELVAR can be used with simple variables or complex variables, but not with elements of complex variables. I.e. structure or list elements cannot be deleted.
Operation | Operands |
DELVAR | MF = E ,PARAM = <name 1..8> / (<integer 1..15>) |
MF = D ,PREFIX = D / prefix | |
MF = C ,PREFIX = D / prefix ,MACID = ELV / macid | |
MF = L ,NAMLEN = <integer 1..255> ,NAMADR = <name 1..8> ,SCOPE = *VISIBLE / *TASKONLY ,CALLER = USER / SYSTEM |
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 D; they can be modified with PREFIX.
PREFIX = D / prefix
Defines the first character of the generated names.
Default: the generated names begin with the letter D.
MF = C
C format of the macro call; generates an operand list whose symbolic names begin with the string DELV. They can be changed with PREFIX and MACID.
PREFIX = D / prefix
Defines the first character of the generated names.
Default: the generated names begin with the letter D.
MACID = ELV / macid
A string of up to three characters that replaces characters 2 to 4 of the generated names. Default: ELV
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
Defines the scope of the variable.
= *VISIBLE
The variable is created as a procedure-local variable.
= *TASKONLY
The variable is created as a task-global variable.
Return codes (hexadecimal)
Subcode2 | Subcode1 | Maincode | Meaning |
00 | 00 | 0000 | Macro call was successful; no error |
01 | 00 | 0000 | Variable not declared |
00 | 01 | 0001 | Parameter error |
00 | 01 | 0002 | Syntax error in variable name |
00 | 40 | 0019 | no delete possible |
00 | 40 | 001A | delete failed |
00 | 01 | FFFF | Unknown unit or function number |
00 | 02 | FFFF | Function not available |
00 | 03 | FFFF | Wrong version of operand list |