SQLDTA command (X'2412')

SQL Program Variable Data (SQLDTA) consists of input data to a SQL statement that a relational database (RDB) is running. It also includes a description of the data.

Format

Read syntax diagramSkip visual syntax diagramDSSHDRLLCPFDOEXTFDODSCFDODTA FDOOFF

Parameters

DSSHDR
The 6-byte header field that contains information about the DSS.
LL
A 2-byte field that contains the length of the SQLDTA command.
CP(X'2412')
The 2-byte code point of the SQLDTA command.
FDOEXT(X'147B')
A scalar object that contains extent data for each SDA that a Formatted Data Object Architecture descriptor (FDODSC) describes. There is an FDOEXT entry for each field definition in the SQLDTAGRP in the FDODSC. The FDOEXT specification that corresponds to a field definition in the FDODSC defines the number of times that field is repeated in the FDODTA object.

Format:

Read syntax diagramSkip visual syntax diagramLLCPBYTSTRDR

Parameters:

BYTSTRDR
A required byte-string data representation, whose length is an even number, such as X'01010101' or X'3D2B11'.
FDODSC(X'0010')
A string that is a DDM scalar whose value is a Formatted Data Object Content Architecture (FD:OCA) descriptor or a segment of an FD:OCA descriptor. An FDODSC consists of one or more FD:OCA triplets that describe the data fields that are contained in another scalar object.

Format:

Read syntax diagramSkip visual syntax diagramLLCPBYTSTRDR

Parameters:

BYTSTRDR
A required byte-string data representation, whose length is an even number, such as X'01010101' or X'3D2B11'.
FDODTA(X'147A')
A scalar object that contains data that a Formatted Data Object Architecture descriptor (FDODSC) describes. The FDODSC might be present with the Formatted Data Object Data (FDODTA), or it might be implicitly defined based on the context of the command in which the FDODTA is used.

Format:

Read syntax diagramSkip visual syntax diagramLLCPBYTSTRDR

Parameters:

BYTSTRDR
A required byte-string data representation, whose length is an even number, such as X'01010101' or X'3D2B11'.
FDOOFF(X'147D')
A scalar object that contains offset data for each SDA that a Formatted Data Object Architecture descriptor (FDODSC) describes. There is an FDOOFF entry for each field definition in the SQLDTAGRP in the FDODSC. The FDOOFF specification corresponding to a field definition in the FDODSC defines the offset to the start of the data entry in the FDODTA. The offset value for the first data array is 0.

Format:

Read syntax diagramSkip visual syntax diagramLLCPBYTSTRDR

Parameters:

BYTSTRDR
A required byte-string data representation, whose length is an even number, such as X'01010101' or X'3D2B11'.

Formatted Data Object Content Architecture (FD:OCA)

The Formatted Data Object Content Architecture (FD:OCA) is an architecture for describing, organizing, and manipulating a linear stream of data.

DDM uses FD:OCA primarily for the description of data for relational database (RDB) access. A complete description of FD:OCA, including how to build and interpret FD:OCA descriptors, is in the FD:OCA Reference.

The functions of FD:OCA are specified through an FD:OCA descriptor, which consists of data structures called triplets. Attribute triplets describe the representation and layout of data in a data stream. Generator triplets specify how the data is manipulated to produce an output data stream.

An FD:OCA-containing architecture, such as DDM, transmits data streams and FD:OCA descriptors between communicating systems and starts a presentation process as needed. The presentation process accepts both the data stream and the FD:OCA descriptor as input and produces a presentation stream as output, as shown in Figure 3-39. The FD:OCA-containing architecture processes any further presentation streams. For example, DDM can forward the presentation stream for storage to an RDB, or it can pass the presentation stream to an application requester.

An Overview of selected FD:OCA triplets

FD:OCA defines many more attribute and generator triplets than the current level of DDM architecture requires. The following is an overview of the triplets.

Scalar Data Arrays (SDA)
SDAs are the triplets that FD:OCA uses for describing data values that are either single items or linear or rectangular arrays of single items that have the same format. DDM uses SDAs primarily to associate data representation specifications with DDM and SQL data types.
Group Data Array (GDA)
GDAs are triplets that define a group of data items as a referable unit. The elements of a GDA point (by label) to SDAs, other GDAs, or to RLOs to describe the data items of the group. The GDA can override certain attributes of each data representation.
Row Layouts (RLO)
RLOs are triplets that describe:
  • A row that contains fields of one or more types
  • A table that contains rows of one or more types
  • Multi-dimensional, mixed data structures
RLOs describe data streams that consist of multiple unrelated structures. DDM uses RLOs primarily to describe the answer data that the SQL statements return.
FD:OCA Descriptors
An FD:OCA descriptor consists of one or more triplets that are laid out consecutively in a byte stream. Triplets that are referenced by other triplets must precede the referencing triplets. Unreferenced triplets are ignored.

SQLDTA examples

The following example shows SQLDTA that is part of the request to an OPNQRY call.

[ibm][db2][jcc][t4]        SEND BUFFER: SQLDTA                 (ASCII)           (EBCDIC)
[ibm][db2][jcc][t4] 0000   002CD00300040026  2412001300100976  .,.....&$......v  ..}.............
[ibm][db2][jcc][t4] 0010   D003000403000406  71E4D00001000F14  ........q.......  }........U}.....
[ibm][db2][jcc][t4] 0020   7A00000000000200  00000005          z...........      :...........