Domain: PROCEDURE
Command description
DELETE-VARIABLE deletes the declaration of an S variable within the current scope, i.e. including the declarations of imported task variables.
The name of the S variable can no longer be used, and its value is deleted.
Either simple or complex variables can be deleted, but not individual elements of complex variables.
The following variable declarations cannot be deleted using DELETE-VARIABLE:
procedure parameters
elements of complex variables
system variables (e.g. SYSWITCH)
container JVs
non-permanent container variables
structure layouts
Format
DELETE-VARIABLE |
VARIABLE-NAME = <structured-name 1..20 with-wild(40)> / list-poss(2000): <structured-name 1..20> |
Operands
VARIABLE-NAME =
Name of the S variable to be deleted.
VARIABLE-NAME = <structured-name 1..20 with-wild(40)>
All the S variables which match this search pattern are deleted.
VARIABLE-NAME = list-poss(2000):<structured-name 1..20>
List of S variables to be deleted.
Command return codes
(SC2) | SC1 | Maincode | Meaning |
0 | CMD0001 | No error | |
1 | 0 | CMD0001 | Warning; nothing executed |
1 | CMD0202 | Syntax error | |
3 | CMD2203 | Incorrect syntax file | |
32 | CMD0221 | System error (internal error) | |
64 | CMD0216 | Do not have required privilege | |
64 | SDP0091 | Semantic error | |
130 | SDP0099 | No further address space vailable |
Note
Error SDP1098 does not appear if variable names are specified with wildcards.
Example 1
Input
/DECLARE-VARIABLE TRIAL /SET-VARIABLE TRIAL=15 /SHOW-VARIABLE TRIAL
Output
TRIAL = 15
Input
/DELETE-VARIABLE TRIAL /SHOW-VARIABLE TRIAL
Output
SDP1008 VARIABLE/LAYOUT 'TRIAL' DOES NOT EXIST SDP0234 OPERAND 'NAME' IS INCOMPLETE
Example 2
Input
/DELETE-VARIABLE SYS* “No error message is returned” /DELETE-VARIABLE SYSSWITCH
Output
SDP1098 DELETE VARIABLE NOT ALLOWED FOR THE VARIABLE 'SYSSWITCH'