Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

DELETE-VARIABLE Delete variable

&pagelevel(4)&pagelevel

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


0CMD0001No error
10CMD0001Warning; nothing executed

1CMD0202Syntax error

3CMD2203Incorrect syntax file

32CMD0221System error (internal error)

64CMD0216Do not have required privilege

64SDP0091Semantic error

130SDP0099No 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'