Session-status is a one byte field that designates the state of the session.
|In this language...||The variable name for Session-status is...|
|This routine...||Does this for Session-status...|
|Session-status is used by...||To...|
DBCHCL places Session-status in the DBCAREA when the Fetch function initiates. If Wait-for-response is set to N, Session-status is available at the completion of the request.
There are four flags in Session-status:
|Pool session||This bit is set by FET at Connect completion.|
|Set bit X‘80‘ to this...||If the session was...|
|1||assigned from a session pool.|
|0||not assigned from a session pool.|
|In transaction||Set bit X‘40‘ to this...||If the session...|
|1||had a transaction in progress when the bit was set.|
|0||did not have a transaction in progress when the bit was set.|
|Cleanup needed||Set bit X‘20‘ to this...||If the default database...|
|1||has changed or if there are still spool files.|
|0||has not changed or if there are not still spool files.|
|In-Doubt||Set bit X‘10‘ to this...||If a Two-phase commit session is...|
|0||not in doubt.|
A fetch is a request-level operation and the flag is a session-level report. Therefore, the current session state may be changed by a subsequent request.