Natural for Mainframes Version 8.2.5 for Mainframes
 —  Statements  —

Function and Basic Syntax Rules

This document covers the following topics:


Function

The DEFINE DATA statement offers a number of clauses to declare data definitions for use within a Natural program, either by referencing predefined data definitions contained in a local data area (LDA), global data area (GDA) or parameter data area (PDA), or by writing in-line definitions.

Top of page

General Syntax Rules

Top of page

Programming Modes

The DEFINE DATA statement is available in structured mode and in reporting mode. Differences are marked accordingly in the DEFINE DATA statement description.

Generally, the following applies:

Structured Mode

All variables to be used, except application-independent variables (AIVs), must be defined in the DEFINE DATA statement; they must not be defined elsewhere in the program. If a DEFINE DATA INDEPENDENT statement is used, AIVs must not be defined elsewhere in the program.

Reporting Mode

The DEFINE DATA statement is not mandatory since variables may be defined in the body of the program. However, if a DEFINE DATA LOCAL statement is used in reporting mode, variables, except application-independent variables (AIVs), must not be defined elsewhere in the program; and if a DEFINE DATA INDEPENDENT statement is used, application-independent variables (AIVs) must not be defined elsewhere in the program.

Top of page