The DDIS RDTA structure
There exists one parent FDLIDLST structure and 1 or more child FDLIDLSTs for every FDOCA row to be retrieved from the data stream. This is true for early and late FDOCA rows. However, a second data structure, the DDIS RDTA structure, is created to support Late Descriptors.
There are two DRDA late descriptors defined: the SQLDTA describes the host variables that are sent in support of EXCSQLSTT or OPNQRY and the SQLDTARD describes the answer set returned from OPNQRY or EXCSQLSTT. Both descriptors have a simple geometry that is built around the late group descriptor, SQLDTAGRP.
The SQLDTA Late Descriptor is built from an SQLDTAGRP and describes input host variables. It is mapped to an input SQLDA. Similarly, the SQLDTARD, also built from the SQLDTAGRP, describes an output answer that is set and is mapped to an output SQLDA. The RDTA structure correlates the SQLDTAGRP elements (SDAs) in terms of SQL data types, lengths, and character representation (CCSID).
The RDTA structure is given the following figure. RDTALID contains the address of the parent SQLDTAGRP FDLIDLST structure that is required to retrieve data that is described by the late SQLDTA/SQLDTARD. For every triplet contained within the SQLDTAGRP, an RDTAENT element exists which defines the SQL attributes for that DRDA data type.
RDTA DSECT Relational Data Block
RDTAID DS H RDTA ID
RDTALEN DS H RDTA Length
RDTAEYE DS CL4 RDTA Eye Catcher
RDTDA DS A A(DB2 Sqlda)
RDTALID DS F offset within 0191 record
* of QW0191LT section
RDTAROW DS A A(Input Host Variables)
RDTALED DS 0XL4
RDTAGLID DS X SQLDTAGRP RLO LID and
* DS XL2 Reserved
RDTANUM DS F Total Number RDTAENT slots
RDTANPH DS F Number of placeholders
RDTAFLG DS X Flag
'80'X RDTARAWP is used
DS XL3 Reserved
RDTALL EQU *-RDTA Sizeof(RDTA Header)
*
RDTAENT DSECT RDTA Entry Mapping - one entry for
* each SDA processed in sqldtagrp
RDTTYP DS H SQLTYPE
RDTUBT DS H SQLSUBTYPE
RDTACCSI DS XL2 Derived CCSID
RDTALGTH DS 0H SQL Length
RDTALEN1 DS X Decimal Precision
RDTALEN2 DS X Decimal Scale
RDTAFLG1 DS X Flag
'80'X Placeholder only
'40'X Mapped type
DS X Reserved
RDTAOTYP DS H Original SQLTYPE, if mapped
RDTARAWP DS A Raw data pointer, if mapped
DS XL4 Reserved
RDTALL EQU *-RDTAENT Sizeof(RDTAENT)