DTAARA keyword
- Free-form standalone field or subfield
- DTAARA{(name)}.
- Free-form data structure
- DTAARA{{(name)} {*AUTO} {*USRCTL}}.
- Fixed-form
- DTAARA{({*VAR:} data_area_name)}.
The DTAARA keyword is used to associate a standalone field, data structure, data-structure subfield or data-area data structure with an external data area. The DTAARA keyword has the same function as the *DTAARA DEFINE operation code (see *DTAARA DEFINE).
The DTAARA keyword can only be used in the main source section. It cannot be used in a subprocedure.
- *CHAR Character
- *DEC Numeric
- *LGL Logical
You can also create a DDM data area (type *DDM) that points to a data area on a remote system of one of the three types above.
Only character, numeric (excluding float numeric), and indicator types are allowed to be associated with data areas. The actual data area on the system must be of the same type as the field in the program, with the same length and decimal positions. Indicator fields can be associated with either a logical data area or a character data area. If you want to store other types in a data area, you can use a data structure for the data area, and code the subfields of any type, except pointers. Pointers cannot be stored in data areas.
Specifying the name of a data area in a literal or variable
dtaaraname
libname/dtaaraname
*LIBL/dtaaraname
- You cannot specify *CURLIB as the library name.
- If you specify a data area name without a library name, *LIBL is used.
- The name must be in the correct case. For example, if the data area name is in a variable, and the variable has the value 'qtemp/mydta', the data area will not be found. Instead, it should have the value 'QTEMP/MYDTA'.