Purpose
Specifies which statement options are used when a request is sent to the database.
Usage Notes
The Options parcel is generated by CLIv2 at the direction of an application, or by an advanced application building its own request parcels (DBCAREA option Request-mode=B).
Parcel Data
The following information applies to the Options parcel.
Flavor | Parcel Body Length | Parcel Body Fields |
---|---|---|
85 | 10, 11, 14, 15, 17, 18, or 21 | RequestMode: 1 byte |
Function: 1 byte | ||
Select-data: 1 byte | ||
Continued-characters-state: 1 byte | ||
APH-response: 1 byte | ||
Return-statement-info: 1 byte | ||
TransformsOff: 1 byte | ||
Maximum DECIMAL precision: 1 byte (ignored if Field Response-mode) | ||
IdentityColumnRetrieval: 1 byte | ||
DynamicResultSets: 1 byte | ||
If present, SP-ReturnResult: 1 byte | ||
If present, PeriodAsStructs: 1 byte
|
||
If present, StatementError: 1 byte | ||
If present, ArrayTransformsOff: 1 byte | ||
If present, XMLformat: 1 byte | ||
If present, Fast-fail: 1 byte | ||
(If present, reserved: 1 byte) | ||
(If present, reserved: 1 byte) | ||
If present, Large-Rows: 1 byte |
Field Notes
The following information applies to Options fields.
The following ten fields must be present for every use of the Options parcel.
Field | Description |
---|---|
RequestMode | RequestMode indicates which mode is used to process a response. The settings are as follows:
If this field contains a binary zero, the database uses the mode specified elsewhere (in the Req, IndicReq, or FMReq parcel) in the request. When two or more parcels in a request specify conflicting modes, the database uses the mode specified in the Options parcel. |
Function | Function corresponds to the Request-processing-option field of the DBCAREA, and indicates whether the intent is to prepare and execute, to prepare, or to execute the request. The settings are as follows:
|
Select-data | Select-data specifies the way data associated with a Large Object is returned, chosen as one of the following EBCDIC characters:
If the field contains a binary zero, a value of 'I' is assumed. |
Continued-characters-state | Continued-characters-state indicates whether character data crossing response parcels is well-formed within each parcel or only when all relevant parcels are considered. This option has effect only for MultipartIndicator Response-mode because only in that mode may data cross parcel boundaries. If not applicable, the option is ignored. The supported values are:
|
APH-response | APH-response indicates whether response parcels may use the alternate parcel header. The supported values are:
|
Return-statement-info | Return-statement-info indicates whether response parcels may use the alternate parcel header. The supported values are:
|
TransformsOff | TransformsOff indicates whether SQL Structured User Defined Types (UDTs) are transformed into their external data type or left as their constituent attributes. The supported values are:
When built by CLIv2, the value used is based on the DBCAREA Transforms-off option. |
Maximum DECIMAL precision | Maximum DECIMAL precision indicates the precision of decimal data types in responses. The supported values are:
|
IdentityColumnRetrieval | IdentityColumnRetrieval indicates whether data is returned in response to an SQL Insert operation when Identity columns are involved. The supported values are:
|
DynamicResultSets | DynamicResultSets indicates whether stored procedures may include the results of its SQL requests in the response to the response to the SQL CALL statement invoking the procedure. The supported values are:
|
When the previous fields are present, the following field may be present also, as needed:
Field | Description |
---|---|
SP-ReturnResult | SP-ReturnResult indicates where the results of the associated request are to be returned. The supported values are:
If this field contains a binary zero, the database uses the mode specified elsewhere (in the Req, IndicReq, or FMReq parcel) in the request. When two or more parcels in a request specify conflicting modes, the database uses the mode specified in the Options parcel. When built by CLIv2, the value used is based on the DBCAREA Return-result-to option; when built by an application, whether this option is permitted by the database can be ascertained using the CLIv2 DBCHQE Result-sets-support query. |
When the previous fields are present, if any of the following three fields are needed, all three must be present:
Field | Description |
---|---|
PeriodAsStructs | PeriodAsStructs indicates whether Period data types are treated as Structured UDTs and supply or return information about the constituent attributes. The supported values are:
When built by CLIv2, the value used is based on the DBCAREA Period-as-struct option; whether this option is permitted by the database can be ascertained using the CLIv2 DBCHQE Transforms-off-usage query. |
Extended-name Response | Extended-name Response indicates whether varying-length column name, title, and format information in existing response parcels (Field (flavor 18), PrepInfo[X] (flavors 86 and 126), StmtInfo (flavor 169)) can be longer than the existing maximum. The supported values are:
When built by CLIv2, the value used is based on the DBCAREA Column-info option; whether this option is permitted by the database can be ascertained using the CLIv2 DBCHQE Build-information query. |
Trusted-request | Trusted-request indicates whether the request is trusted to use the Teradata SQL SET QUERY_BAND='PROXYUSER=...' statement to change the session userid. The supported values are:
When built by CLIv2, the value used is based on the DBCAREA Trusted-request option; whether this option is permitted by the database can be ascertained using the CLIv2 DBCHQE Trusted-request-support query. |
When the previous fields are present, the following field may be present also, as needed:
Field | Description |
---|---|
StatementError | StatementError indicates whether each statement in a multi-statement request might reflect an error. The supported values are:
When built by CLIv2, the value used is based on the DBCAREA Multi-statement-error option; when built by an application, whether this option is permitted by the database can be ascertained using the CLIv2 Build-information query. |
When the previous fields are present, if either of the following two fields are needed, both must be present:
Field | Description |
---|---|
ArrayTransformsOff | ArrayTransformsOff indicates whether SQL Array Types are transformed into VARCHAR data or left as their internal type. The supported values are:
When built by CLIv2, the value used is based on the DBCAREA DBRIATO option; when built by an application, whether this option is permitted by the database can be ascertained using the CLIv2 Build-information query. |
XMLformat | XML-response-format indicates the format in which XML data is returned. The supported values are:
When built by CLIv2, the value used is based on the DBCAREA XML-response format option; when built by an application, whether this option is permitted by the database can be ascertained using the CLIv2 Build-information query. |
When the previous fields are present, the following field may be present also, as needed:
Field | Description |
---|---|
Fast-fail | Fast-fail indicates whether or not the database delays due to database workload throttling cause the request to be failed. The supported values are:
When built by CLIv2, the value used is based on the DBCAREA Wait-during-delay option; when built by an application, whether this option is permitted by the database can be ascertained using the CLIv2 Build-information query. |
If the DBCAREA option Request-mode=B was specified and a request is being built that is similar to what CLIv2 builds, when present, the Options parcel must be the first parcel.
When the previous fields are present, if any of the following three fields are needed, all three must be present:
Field | Description |
---|---|
(reserved) | Always contain binary zeroes. |
(reserved) | Always contain binary zeroes. |
Large-Rows | Large Rows indicates whether response rows may be larger than 65535 bytes. The supported values are:
When built by CLIv2, the value used is based on the DBCAREA Large-row-OK option. Applications may determine the size of the maximum response length using the DBCHQE CLIv2-limits query. |