15.10 - MultipartRecord - 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

For MultipartIndicator mode responses, returns one row or part of one row of selected results. Null values are explicitly indicated.

Usage Notes

The MultipartRecord parcel returns one row of selected results. In Indicator Mode, null values are explicitly identified.

In Indicator Mode, the parcel immediately before the first Record Mode MultipartRecord parcel is a Success parcel; in Indicator Mode, the parcel immediately before the first Indicator Mode MultipartRecord parcel is a DataInfoX parcel, which is preceded by the Success parcel.

Note that a Teradata SQL SHOW TABLE statement returns only one MultipartRecord parcel. Within the MultipartRecord parcel, each line of a table is separated from the next by hex 0D (decimal 13).

This parcel is generated by the Teradata server.

Parcel Data

The following information applies to the MultipartRecord parcel (in Indicator Mode).

 

Flavor

Parcel Body Length

Parcel Body Fields

144

1 to maximum body size

NullIndicators: (n+7)/8 bytes

  where:

    n = the number of items in the

      Data Field, organized as:

       bit 1, but 2, . . . , bit i,

       . . . , but n, unused bits

Data: 1 to 32000 - ((n+7) / 8) bytes

  organized as: item 1, item2, . . . , item i,

        . . . , item n

Field Notes

The Data Field contains items with characteristics as follows:

  • The NullIndicators Field contains one bit for each item in the DataField, stored in the minimum number of 8‑bit bytes required to hold them, with the unused bits in the rightmost byte set to zero.
  • Each bit is matched on a positional basis to an item in the Data Field. That is, the ith bit in the NullIndicators Field corresponds to the ith item in the Data Field.

     

    If a bit is...

    Then the value of the corresponding data item is...

    ON

    null.

    OFF

    not null.

    Whether the null indicator bit is ON or OFF, the length of the corresponding data item is meaningful.

    The Data Field contains a formatted record of data:

     

    If the data item is to contain...

    Then...

    a variable length string

    the length portion of the data item is set to the actual length of the string which is zero if the data item represents a null value.

    an integer

    the data item will occupy four bytes which is zeros if the data item represents a null value.

  • The Data Field contains items with characteristics as follows:
  • The order of the items.
  • Each expression in the SELECT statement generates one data item in the Indicator Mode MultipartRecord parcel, in the order listed in the SELECT statement.

    That is, the ith data item in the Indicator Mode MultipartRecord parcel contains the result of the ith expression in the SELECT statement.

  • The data type of each item.
  • Each item in the Data Field of the Indicator Mode MultipartRecord parcel has the data type which is specified in the corresponding data type code in the DataInfoX parcel between the Success parcel and the first Indicator Mode MultipartRecord parcel.

    That is, the ith data item in the Indicator Mode MultipartRecord parcel has the ith data type coded in the DataInfoX parcel.

  • The length of each item.
  • Each item in the Data Field of the Indicator Mode MultipartRecord parcel has the length which is specified in the corresponding length in the DataInfoX parcel between the Success parcel and first Indicator Mode MultipartRecord parcel.

    That is, the ith data item in the Indicator Mode MultipartRecord parcel has the ith length in the DataInfoX parcel.

  • The format of each item.
  • The contents of each item are in client internal format, as determined by the data type. See Table 65 on page 428.

    For the form that a null value takes for each of these data types, see “Manipulating Nulls” in SQL Fundamentals (B035‑1141).