15.10 - StatementInformation - Call-Level Interface Version 2

Teradata Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

prodname
Call-Level Interface Version 2
vrm_release
15.10
category
Programming Reference
featnum
B035-2417-035K

Purpose

Describes the data items contained in the request when those attributes are not otherwise known. If more data needs be returned than will fit into a single StatementInformation parcel, multiple parcels may be provided.

Parcel Data

The following information applies to the StatementInformation parcel.

 

Flavor

Parcel Body Length

Parcel Body Fields

169

6 to maximum parcel size

Self-defining extensions: Six or more bytes

One or more self-defining extensions are present to convey situation-dependent information. While the extensions may require more than one StatementInformation parcel, an extension will be wholly contained in one parcel. The extensions fall into two types: those that describe one or more items and those with an Information Layout of End‑information that end related extensions of the first type.

Each extension begins with the following fields:

 

Field

Length

Description

PBTILOUT

2-byte unsigned integer

Information Layout identifies the layout of the data following the header, as one of the following:

1 Full-layout

2 Limited-layout

3 Statistic-layout. Used only in responses. For details, see “StatementInformation” on page 466.

4 End-information

5 Untransformed limited-layout

PBTIID

2-byte unsigned integer

Information Id identifies the type of extension. Used only in responses.

1 Parameter - Used only when DBCAREA Request-processing-option is 'S' (Prepare mode supporting parameterized SQL) (corresponding to the Options parcel [flavor 85] Function 'S' option).

2 Query

3 Summary

4 Identity-column

5 Stored-procedure-Output

6 Stored-procedure-resultSet

7 Estimated-processing

8 Data‑attributes - Describes the data items contained in the request when those attributes are not otherwise known.

For more information, see “StatementInformation” on page 466.

PBTILEN

2-byte unsigned integer

Information Length specifies the length of subsequent data in the extension (does not include the length of the extension header).

The Full‑layout is used for Data‑attributes, when DBCAREA Request‑processing‑option is 'P' (Prepare) or 'B' (Prepare and Execute) (corresponding to the Options parcel [flavor 85] Function 'P', and 'B' options). Table 95 shows the Full‑layout fields. Full‑layout field not listed in this table are used only in responses. For details, see “StatementInformation” on page 466.

 

Table 95: Full-layout Fields for Requests 

Field

Length

Description

PBTIFDT

2-byte unsigned integer

Specifies the data type of the item. In addition to the data types available for the PrepInfo[X] (flavor 86 or 125) and DataInfo[X] (flavor 71 or 146) parcels. See Table 65 on page 428 for the possible data types. See Table 76 on page 472 for additional data types that are also supported.

PBTIFMDL

8-byte unsigned integer

The total number of bytes of data that might be sent for this item.

PBTIFND

2-byte unsigned integer

The total number of digits if the item has a decimal or numeric data type.

PBTIFNID

2-byte unsigned integer

The number of interval digits if the item is a temporal data type.

PBTIFNFD

2-byte unsigned integer

The number of fractional digits if the item is a decimal data type (or the deprecated temporal types such as time, timestamp, interval ... to second, and interval second).

Note: While only five fields are honored, all full-layout fields must be present. (See Table 75 on page 468.) Fields with a two-byte length followed by text also of that length must be valid. That is, the length must correspond to the number of bytes of text.

When at least one more byte is present, the first such byte is defined as follows:

 

Field

Length

Description

PBTIFTP

 

1-byte character

Set to one of the following EBCDIC characters:

  • 'I' if the item is a storedprocedure IN parameter
  • 'O' if the item is a storedprocedure OUT parameter
  • B' if the item is a storedprocedure INOUT parameter
  • 'U' if the item is not a storedprocedure parameter, or if the information is unavailable
  • PBTILDOS

    2 bytes

    When Transforms are off for this type of item, the depth of this attribute of the item's structure. A value of zero indicates the item is not a structure or Transforms are not off. Other values indicate the nesting level of the structure.

    PBTIFTC

    1-byte character

    Used only in responses. See “StatementInformation” on page 466.

    PBTILUA

    2 byte unsigned integer plus the number of bytes specified by that integer

    When Transforms are off for this type of item, Untransformed Attribute Name consists of the length in bytes of the name of this attribute in the item's structure, followed by that name in characters from the current session character set. If the item is not a structure or Transforms are not off, the length is zero and no name is present. The maximum length of a name may be obtained using the DBCHQE SQL-limits query.

    PBTILTDT

    2 byte unsigned integer

    When Transforms are off for this type of item, specifies the data type of the untransformed item. If the item is not a structure or Transforms are not off, the value is zero. In addition to the data types available for the PrepInfo[X] (flavor 86 or 125) and DataInfo[X] (flavor 71 or 146) parcels, which are defined in “Data Type” on page 428. Table 65 on page 428 contains a list of the possible data types. See Table 76 on page 472 for additional data types that are also supported.

    The Limited‑layout is used for Data‑attributes when DBCAREA Request‑processing‑option is 'E' (Execute) (corresponding to the Options parcel (flavor 85) Function 'E' option). Table 96 describes the Limited‑layout fields specific for requests.

     

    Table 96: Limited-layout Fields for Requests 

    Field

    Length

    Description

    PBTILDT

    2 byte unsigned integer

    Specifies the data type of the item. In addition to the data types available for the PrepInfo[X] (flavor 86 or 125) and DataInfo[X] (flavor 71 or 146) parcels, which are defined in “Data Type” on page 428. Table 65 on page 428 contains a list of the possible data types. See Table 76 on page 472 for additional data types that are also supported.

    PBTILMDL

    8 byte unsigned integer

    The total number of bytes of data that might be sent for this item.

    PBTILND

    2 byte unsigned integer

    The total number of digits if the item has a decimal or numeric data type.

    PBTILNID

    2 byte unsigned integer

    The number of interval digits if the item is a temporal data type.

    PBTILNFD

    2 byte unsigned integer

    The number of fractional digits if the item is a decimal data type (or the deprecated temporal types such as time, timestamp, interval ... to second, and interval second).

    The Untransformed limited-layout is used for Data‑attributes when DBCAREA Request‑processing‑option is 'E' (Execute) (corresponding to the Options parcel (flavor 85) Function 'E' option). Table 96 describes the Untransformed limited-layout fields specific for requests.

     

    Table 97: Untransformed limited-layout Fields for Requests 

    Field

    Length

    Description

    PBTIUDT

    2 byte unsigned integer

    Specifies the data type of the item. In addition to the data types available for the PrepInfo[X] (flavor 86 or 125) and DataInfo[X] (flavor 71 or 146) parcels, which are defined in “Data Type” on page 428. Table 65 on page 428 contains a list of the possible data types. See Table 76 on page 472 for additional data types that are also supported.

    PBTIUMDL

    8 byte unsigned integer

    The total number of bytes of data that might be sent for this item.

    PBTIUND

    2 byte unsigned integer

    The total number of digits if the item has a decimal or numeric data type.

    PBTIUNID

    2 byte unsigned integer

    The number of interval digits if the item is a temporal data type.

    PBTIUNFD

    2 byte unsigned integer

    The number of fractional digits if the item is a decimal data type (or the deprecated temporal types such as time, timestamp, interval ... to second, and interval second).

    When at least one more byte is present, the first such additional is defined as follows:

     

    Table 98: Untransformed limited-layout Fields for Requests 

    Field

    Length

    Description

    PBTIUTDT

    2 byte unsigned integer

    When Transforms are off for this type of item, specifies the data type of the untransformed item. If the item is not a structure or Transforms are not off, the value is zero. In addition to the data types available for the PrepInfo[X] (flavor 86 or 125) and DataInfo[X] (flavor 71 or 146) parcels, which are defined in “Data Type” on page 428. See Table 76 on page 472 for additional data types that are also supported.

    PBTIUAT

    2 byte unsigned integer plus the number of bytes specified by that integer

    Array Element Type Name consists of the length in bytes of the name followed by that name in characters from the session character set. If the type is not an array, the length is zero and no name is present. The maximum length of a name may be obtained using the DBCHQE SQL-limits query.

    PBTIUAD

    2 byte unsigned integer plus two lists, each containing the number of 4 byte unsigned entries specified by that integer

    Array Number of Dimensions consists of the number of dimensions in the array followed by two lists: the first specifies the number of elements in that dimension of the array; the second specifies the lower bound for that dimension of the array. If the type is not an array, the number of dimensions is zero and the two lists are not present.

    The End‑information layout indicates there are no more items for the current information (Data-attributes). No data exists for End-information.