Delete variable
| Component: | SDF-P-BASYS | 
| Functional area: | Procedures | 
| Domain: | PROCEDURE | 
| Privileges: | STD-PROCESSING  | 
Function
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 
- nonpermanent container variables 
- structure layouts 
 
Note
In such cases, error message SDP1098 is only output if no wildcards are specified in the variable name.
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.
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 available |