STACK
|
|||
RELEASE
|
SETS [set-name]
|
||
VARIABLES
|
This document covers the following topics:
For an explanation of the symbols used in the syntax diagram, see Syntax Symbols.
Related Statements: STACK
| FIND
with RETAIN
option |
DEFINE DATA GLOBAL
The RELEASE
statement is used to:
delete the entire contents of the Natural stack;
release sets of ISNs retained via a FIND
statement that contained a RETAIN
clause (applicable to Adabas
databases only);
reset global and application-independent variables.
Operand Definition Table:
Operand | Possible Structure | Possible Formats | Referencing Permitted | Dynamic Definition | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
set-name
|
C | S | A | no | no |
Syntax Element Description:
Syntax Element | Description |
---|---|
RELEASE STACK |
RELEASE STACK Option:
Causes all data/commands currently in the Natural stack to be deleted. |
RELEASE SETS |
RELEASE SETS Option:
Is applicable to Adabas databases only. If only |
RELEASE SETS
set-name |
Causes a specific single ISN set to be released. RELEASE SET 'CITY-SET' MOVE 'CITY-SET' TO #SET(A32) RELEASE SET #SET |
RELEASE VARIABLES |
RELEASE VARIABLES Option:
Causes all variables defined in the current global data area (GDA) to be reset to their initial values. Also, it eliminates all application-independent variables (AIVs), thus making them no longer available. The |
** Example 'RELEX1': FIND (with RETAIN clause and RELEASE statement) ************************************************************************ DEFINE DATA LOCAL 1 EMPLOY-VIEW VIEW OF EMPLOYEES 2 CITY 2 BIRTH 2 NAME * 1 #BIRTH (D) END-DEFINE * MOVE EDITED '19400101' TO #BIRTH (EM=YYYYMMDD) * FIND NUMBER EMPLOY-VIEW WITH BIRTH GT #BIRTH RETAIN AS 'AGESET1' IF *NUMBER = 0 STOP END-IF * FIND EMPLOY-VIEW WITH 'AGESET1' AND CITY = 'NEW YORK' DISPLAY NOTITLE NAME CITY BIRTH (EM=YYYY-MM-DD) END-FIND * RELEASE SET 'AGESET1' * END
NAME CITY DATE OF BIRTH -------------------- -------------------- ---------- RUBIN NEW YORK 1945-10-27 WALLACE NEW YORK 1945-08-04