Session Status is a one byte field that designates the state of the session.
In this language... |
The variable name for Session Status is... |
COBOL |
DBCAREA‑SESS‑STATUS |
PL/I |
SESS_STATUS |
C |
sess_status |
IBM Assembler |
DBCOFLG1 |
This routine... |
Does this for Session Status... |
DBCHINI |
writes |
DBCHCL |
writes (FET) |
Session Status is used by... |
To... |
applications |
read. |
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:
Flag Name |
Description |
|||
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 session 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 2PC session is... |
|
|
|
1 |
in doubt. |
|
|
|
0 |
not in doubt. |
|
|
|
Note: The In transaction and Cleanup needed flags are dependent on timing.
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.