Schema IQUERY
DTAARA( DATA_AREA_LIBRARY => '*LIBL', DATA_AREA => 'data-area-name', STARTPOS => 1 (1 to 2000),
POSITIONS => -1 (1 to 2000) );
DTAARA( DATA_AREA => 'library/data-area', STARTPOS => 1 (1 to 2000),
POSITIONS => -1 (1 to 2000) );
The Retrieve Data Area Data (DTAARA) User Defined Table Function
returns one row containing the data area's content along with its
attributes.
Note: If the parameter keywords are NOT specified, users can call
the DTAARA UDTF with positional parameters. To simplify use, the
data area name may be specified as the first parameter. For
example, in the following 3 statement, the data area MYAREA exists
and QGPL is on the library list at the time it is run:
All three variations produce an identical result. When this style is used, it is recommended to use the full parameter list (option 3) to make the statement more clear, but it is not required.
Default: 1
The first position within the data area to return. If this parameter is not specified, position 1 is used.
Default: -1 or NULL
The length of the data area to be returned, starting with the STARTPOS value and continuing for the number of bytes specified for this parameter. If this parameter is not specified, the data from the STARTPOS through the end of the data area is returned.DCL-S OldParms CHAR(1024);
EXEC SQL select data_area_value FROM TABLE(iQuery.DTAARA('*LDA')) da INTO :OldParms;
Column | Data Type | Description |
DTAARA |
VARCHAR(10) |
The name of the data area. |
DTAARALIB |
VARCHAR(10) | The library name where the data area is
located. |
DTAARATYPE |
VARCHAR(5) | The data area type, such as *CHAR, *DEC, or
*LGL |
LENGTH |
INT | The data area length. |
DECPOS | INT | For Data Area Type *DEC, this column contains
the number of decimal positions, otherwise it is null. |
DATA_AREA_VALUE |
VARCHAR(2000) |
The current value stored in the data area.
Note that if the STARTPOS or POSITIONS parameters are
specified, the result is returned left-justified in this
column. |