Start of change

DATA_AREA_INFO view

The DATA_AREA_INFO view returns the values of data areas.

The values returned for the columns in the view are closely related to the values returned by the Retrieve Data Area (RTVDTAARA) CL command and the Retrieve Data Area (QWCRDTAA) API.

Authorization: The caller must have:
  • *USE authority to the data area, and
  • *EXECUTE authority to the library containing the data area.

For a DDM data area, the caller must be able to connect to the remote system.

To return information for the data area on the remote system, the caller must have:
  • *USE authority to the data area, and
  • *EXECUTE authority to the library containing the data area.

The following table describes the columns in the view. The system name is DTAARA_INF. The schema is QSYS2.

Table 1. DATA_AREA_INFO view
Column Name System Column Name Data Type Description
DATA_AREA_LIBRARY DTAARA_LIB VARCHAR(10) Library containing the data area.
DATA_AREA_NAME DTAARA VARCHAR(10) Name of the data area.
DATA_AREA_TYPE TYPE VARCHAR(5)
Nullable
The type of data area.
*CHAR
A character data area.
*DEC
A decimal data area.
*LGL
A logical data area.

Contains the null value if this is a DDM data area that was unable to access the data.

LENGTH LENGTH INTEGER
Nullable
Specifies the length of the data area.
  • For a character data area, it is the maximum number of characters.
  • For a numeric data area it is the total number of digits, including decimal positions.
  • For a logical data area, it is always 1.

Contains the null value if this is a DDM data area that was unable to access the data.

DECIMAL_POSITIONS SCALE INTEGER
Nullable
Specifies the number of digits to the right of the decimal point for a decimal data area.

Contains the null value if not a decimal data area or if this is a DDM data area that was unable to access the data.

DATA_AREA_VALUE VALUE VARCHAR(2000)
Nullable
The value currently assigned to the data area as character data.

For a decimal data area, the SQL default decimal point is used. See Decimal point.

Contains the null value if this is a DDM data area that was unable to access the data.

DATA_AREA_BINARY_VALUE BIN_VALUE VARBINARY(2000)
Nullable
The value currently assigned to the data area as binary data.

Contains the null value if this is a DDM data area that was unable to access the data.

SQL_SEQUENCE SEQUENCE VARCHAR(3) This data area is defined as an SQL sequence.
NO
This is not an SQL sequence.
YES
This is an SQL sequence.
TEXT_DESCRIPTION TEXT VARCHAR(50)
Nullable
The text description of the data area.

Contains the null value if the data area has no description or if this is a DDM data area.

Example

  • Return a list of values for all data areas in MYLIB.
    SELECT DATA_AREA_NAME, DATA_AREA_VALUE FROM QSYS2.DATA_AREA_INFO
      WHERE DATA_AREA_LIBRARY = 'MYLIB';
End of change