DBCHCL DSC Function - Teradata Tools and Utilities

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

Product
Teradata Tools and Utilities
Release Number
17.10
Published
June 2021
Language
English (United States)
Last Update
2021-07-01
dita:mapPath
zwv1608578409227.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2417
Product Category
Teradata Tools and Utilities

Purpose

DSC (Disconnect) logs a session off the database.

Usage Notes

  • Check the Return Code; if zero, the disconnect was successfully completed.
    • If the session has a pending request, a return code of 336 (request may be aborted) is returned to the application. The session is still logged off but the response is lost.
    • If there is an active transaction at the time of the DSC, the database rolls back all work performed within that transaction prior to completing the logoff.
  • Use DSC to clean up session context even if the connect was not successful (initial or final status).
  • In Two-phase commit mode, Disconnect ensures that the current session is aborted at syncpoint if the session has performed any uncommitted Teradata SQL requests.

DBCAREA Input Fields

Before using the Disconnect function, the application must set the DBCAREA fields in the first table and may optionally set those in the second table depending on the application's requirements.

DBCAREA Input Fields Required for the Disconnect Function
Function Input-CLIv2-connection-number
DBCAREA Input Fields Optional for the Disconnect Function
Message-area-length Message-area-pointer

DBCAREA Output Fields

Upon completion of the Disconnect function, CLIv2 always sets DBCAREA fields in the table.

DBCAREA Output Fields always set by the Disconnect Function
Message-return-code Message-length
Message-text Message-text-length