Natural for Windows Version 8.3.7 for Windows
 —  Statements  —

Defining NaturalX Objects

General syntax of DEFINE DATA OBJECT:

DEFINE DATA
  OBJECT

../graphics/sbo3.gif

USING

../graphics/cbo2.gif

local-data-area
parameter-data-area

../graphics/cbc2.gif

../graphics/sbc3.gif

local-data-definition ../graphics/dot3.gif  
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 OBJECT statement is used in a subprogram or class in conjunction with NaturalX.

Top of page

Syntax Description

Syntax Element Description
USING local-data-area
LDA Name:

A local data area (LDA) contains data elements which are to be used in a single Natural module. You may reference more than one data area; in that case you have to repeat the reserved words OBJECT and USING, for example:

DEFINE DATA
  OBJECT USING DATX_L
  OBJECT USING DATX_P

  ...
END-DEFINE ;

For further information, see also Defining Fields in a Separate Data Area in the Programming Guide.

USING parameter-data-area
PDA Name:

A data area defined with DEFINE DATA OBJECT may be a parameter data area (PDA). By using a PDA as an object data area you can avoid the extra effort of creating an object data area that has the same structure as the PDA.

local-data-definition
Local Data Definition:

Data can also be defined directly using the syntax shown in Local Data Definition in the section Defining Local Data.

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