DBCHCL DSC Function - Call-Level Interface Version 2

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

Product
Call-Level Interface Version 2
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-05-07
dita:mapPath
jen1488824663137.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

Purpose

DSC (Disconnect) logs a session off the Teradata 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 Teradata Database rolls back all work performed within that transaction prior to completing the logoff.
  • DSC should be used 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
DBCAREA Input Fields Required for the Disconnect Function
Function Input-CLIv2-connection-number
DBCAREA Input Fields Optional for the Disconnect Function
DBCAREA Input Fields Optional for the Disconnect Function
Message-area-length Message-area-pointer

DBCAREA Output Fields

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

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