17.10 - DBFDSC - 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)

DBFDSC is the Disconnect function of DBCHCL.

DBFDSC is used to log a session off the database and de-allocate internal structures allocated by DBFCON.

How It Works

DBFDSC performs the following function:
  • If session active, awaits completion
  • If the application has requested option updates, performs option set/validation logic
  • Performs logical ERQ on all open requests, except for spool file cancel processing
  • Sends logoff request to the database
  • Frees all session-related control blocks

Successful Disconnect Operation

The sequence of operations for a successful disconnect operation follows:
  1. Call DBCHCL for DBFDSC
  2. Check that the return code is zero.

If the session being disconnected has a pending request, DBCHCL returns control to the application program with a return code zero.

Both the return code of zero and the return code of “request may be aborted” allow the application program to be certain that the session is logged off. The application does not have to do further checking. However, if the application program receives a return code of “request may be aborted,” the application program cannot determine whether the request aborted.

If a transaction is in progress, logging the session off causes the transaction to be rolled back.

DBFDSC is not affected by the setting of Wait For Response.

For a connect that was unsuccessful, the internal structures that CLI allocated for the session still exist.

Interface

Function: DBFDSC - Disconnect
Purpose: Logoff session and free associated control blocks
Parms: