15.10 - Multi-Statement Management - 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

Two or more Teradata SQL statements, separated by semicolons, can be combined into a single request. Teradata Database attempts to execute these statements in parallel. A single response is returned, consisting of the results for each statement, which the application processes until all are exhausted.

If the DBCAREA Multi‑statement‑errors option is 'N' and a statement fails, an Error or Failure parcel is present and the other statements are not processed. If the DBCAREA Multi‑statement‑errors option is 'Y' and a statement fails with certain types of data errors, a StatementError parcel is returned for that statement, and the other statements are processed. If a statement succeeds, the first parcel is a Success, OK, or StatementStatus parcel; various parcels follow, ending with an EndStatement parcel. The last parcel is an EndRequest parcel.

The first parcel always contains the statement number, which normally corresponds to the ordinal position of the statement in the request; however, if a statement is an SQL CALL, and the DBCAREA Result‑sets‑OK options allows the called procedure to return response parcels, each such returned response will also increment the statement number, the ActivityType will be 176. The presence of the ResultSet parcel indicates such additional statement numbers.