Natural for OpenVMS Version 6.3.12 for OpenVMS
 —  Statements  —

RELEASE

 

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


Function

The RELEASE statement is used to:

Top of page

Syntax Description

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, without a set-name, is specified, all ISN sets retained with a FIND statement with a RETAIN clause will be released.

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 to be reset to their initial values. Also, it eliminates all application-independent variables (AIVs), thus making them no longer available.

Top of page

Example

** 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                                                 

Output of Program RELEX1:

NAME                 CITY            DATE   
                                              OF    
                                            BIRTH   
-------------------- -------------------- ----------
                                                    
RUBIN                NEW YORK             1945-10-27
WALLACE              NEW YORK             1945-08-04

Top of page