Previous Topic: &VARTABLE DELETE

Next Topic: &VARTABLE GET


&VARTABLE FREE

Allows an NCL procedure to delete an entire vartable, including entries and the vartable definition, to free storage.

&VARTABLE FREE ID=tablename 
             [ SCOPE={ PROCESS | REGION | SYSTEM | AOM } ]

Operands:

ID=tablename

(Mandatory) Indicates the name of the table you wish to free. tablename must be the name of an existing vartable, within the specified scope.

SCOPE= { PROCESS | REGION | SYSTEM | AOM }

An optional parameter, indicating the scope of the table you wish to free. Allowed values are:

PROCESS

Indicates the table is visible only to the NCL process that allocates it. This includes any nested or higher-level EXECuted procedures.

REGION

Indicates the table is visible to all NCL procedures executing in the current region. This includes any procedures executing in another window, if you have more than one window open.

SYSTEM

Indicates that the table is visible to all NCL procedures executing in the same system.

AOM

Indicates the statement refers to a mirrored vartable. The mirrored copy of the vartable is also freed if AOM is started.

Note: SCOPE=AOM is available only if your region includes Automation Services products.

Examples: &VARTABLE FREE

&VARTABLE FREE ID=MYTABLE

This example frees the private table called MYTABLE.

&VARTABLE FREE ID=RTABLE SCOPE=REGION

This example frees a table in the current region called RTABLE, if it exists.

Return Codes:

System variable &ZFDBK is set after an &VARTABLE FREE statement to indicate the result of the operation:

0

The table was freed successfully.

16

No table with this name exists within this scope.

20

SCOPE=AOM table was in use at the exact time the deletion of the mirrored copy was attempted. The table remains allocated.

&ZFDBK value 20 is possible with AOM tables only. If this happens, the NCL procedure should delay for approximately one second and try again.

Note:

Syntax errors in a &VARTABLE FREE statement will cause the NCL procedure to terminate.