Defining Global Data

General syntax of DEFINE DATA GLOBAL:

   GLOBAL USING global-data-area [WITH block[.block...]]

This document covers the following topics:

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


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

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 Data Area Editor. It contains predefined data elements which can be included in the DEFINE DATA GLOBAL statement.

In contrast to an LDA, the data elements defined in a GDA can be referenced by more than one Natural 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(s) to be Used:

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

End of DEFINE DATA Statement:

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