Defining NaturalX Objects

#### Search Results

Search

# Defining NaturalX Objects

General syntax of `DEFINE DATA OBJECT`:

`DEFINE DATA`
`OBJECT` |  | `USING` |  | local-data-area parameter-data-area |  |
local-data-definition |
`END-DEFINE` |

This document covers the following topics:

- DEFINE DATA OBJECT Usage

- DEFINE DATA OBJECT Syntax Description

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

## DEFINE DATA OBJECT Usage

The `DEFINE DATA OBJECT` statement is used in a subprogram or class in conjunction with NaturalX.

For further information, refer to the section NaturalX in the Programming Guide.

## DEFINE DATA OBJECT 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.

### On this page

- DEFINE DATA OBJECT Usage
- DEFINE DATA OBJECT Syntax Description