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
- 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
- Call DBCHCL for DBFDSC
- 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.
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: |