Previous Topic: VARTABLE ALLOC Command—Define New Vartable

Next Topic: VARTABLE FREE Command—Delete Vartable


VARTABLE DELETE Command—Delete a Vartable Entry

The VARTABLE DELETE command deletes an entry from an existing memory-resident vartable.

This command has the following format:

VARTABLE DELETE ID=tablename [SCOPE=scope] [KEY=key] 
               [FIELDS=(.USERCORR) VARS=(var)]
ID=tablename

Specifies the name of the table.

Characters: A through Z, a through z, 0 through 9, #, $, and @

Limits: 1 through 12 characters

SCOPE={SYSTEM | PROCESS | REGION}

Specifies the scope of the vartable.

Default: PROCESS

KEY=key

Specifies the key for this table entry.

If the table is allocated with KEYFMT=CHAR and the key is shorter than the declared key length, the supplied key value is padded with blanks. If the key is longer, a return code of 12 is set in RC and no action is taken on the entry. If the key contains spaces, enclose the key between quotes, for example:

ThisKey = Feature||' '||Version||' '||PrdId
"VARTABLE …",
"       KEY='"||ThisKey||"'",
…
"VARTABLE …",
"       KEY='TPCF 99.99.99 MMGR-SQJ'",
…

If the table was allocated with KEYFMT=NUM, the key value must be a valid, signed number.

FIELDS=.USERCORR

Specifies that a user correlator is used for validation against the entry.

VARS=var

Specifies the REXX variable that contains the user correlator value.

Example: VARTABLE DELETE

KEY='KEY001'
'VARTABLE DELETE ID=MYTABLE KEY='||KEY

Return Codes

The codes returned are the same as the &ZFDBK values as documented for the NCL &VARTABLE verb.

The return codes are as follows:

0

Indicates that the request was satisfied.

4

Indicates that no entry with the requested key value exists.

8

Indicates that an entry with the supplied key value exists, but the supplied user correlator value did not match the user correlator value in that entry.

12

Indicates that the supplied key value was longer than the table key length.

16

Indicates that no table of this name exists in this scope.