17.10 - Aborting a LOB Request: Example - Call-Level Interface Version 2

Teradata® Call-Level Interface Version 2 Reference for Workstation-Attached Systems

Product
Call-Level Interface Version 2
Release Number
17.10
Release Date
October 2021
Content Type
Programming Reference
Publication ID
B035-2418-061K
Language
English (United States)

Applications can abort a deferred client-to-server transfer of LOB data or create a UDF request. For example, assume a session has been created and a request transfer of LOB data in deferred mode is initiated. If the application wants to abort the request, the DBCAREA field continuation_code to 'C'. Then set the DBCAREA function code to DBFCRQ and call DBCHCL

DBCHCL

DBCHCL allocates a request buffer and places a PclUCABORT parcel in the message body part of the Request Buffer. DBCHCL places the session and Request Ids in the MTDPCB, sets the function code to MTDPABOT, and calls MTDP.

MTDP

MTDP prepares and sends an Abort Request message to the database, and waits for the Abort Response message. MTDP then returns control to DBCHCL.

DBCHCL

If the return code in the MTDP Control Block is not normal, DBCHCL returns the error message pointed to by the DBCAREA to the application. Otherwise, the buffers allocated to the request are returned to free memory and the RCB is removed from its RCB list and returned to free memory.

If the return code or error flag in the DBCAREA is not normal, the application makes the appropriate changes and then re-submits the DBCAREA to DBCHCL.