Natural for OpenVMS Version 6.3.12 for OpenVMS
 —  Statements  —

Defining Global Data

General syntax of DEFINE DATA GLOBAL:

DEFINE DATA
   GLOBAL USING global-data-area [WITH block[.block...]]
END-DEFINE

This document covers the following topics:

For an explanation of the symbols used in the syntax diagram, see Syntax Symbols.


Function

The DEFINE DATA GLOBAL statement is used to define data elements using a GDA (see Global Data Area).

Top of page

Syntax Description

Syntax Element Description
USING global-data-area
GDA Name:

Specify the name of a global data area (GDA) to be referenced.

A GDA is created with the source editor. It contains predefined data elements which can be included in the DEFINE DATA LOCAL statement.

In contrast to an LDA, the data elements defined in a GDA can be referenced by more than one programming object.

For further information, see Global Data Area in the Programming Guide.

WITH block
Data Blocks:

To save data storage space, you can create a global data area with data blocks. Data blocks can overlay one another during program execution, thereby saving storage space.

The maximum number of block levels is 8 (including the master block).

For further information, see Data Blocks in the Programming Guide.

.block
Block(s) to be Used:

A single or multiple .block notations specify the block(s) which are used in the program.

END-DEFINE
End of DEFINE DATA Statement:

The Natural reserved word END-DEFINE must be used to end the DEFINE DATA statement.

Top of page