Hi,
According to Application Programming and SQL Guide chapter 29:
"If DB2 terminates, a task that issued CONNECT must issue DISCONNECT
to reset the CAF control blocks. The function returns the reset
accomplished return codes
and reason codes (+004 and X'00C10824'), and ensures that future
connection requests from the task work when DB2 is back on line."
My CAF batch application issues CONNECT and works fine.
When STOP DB2 command is entered, my tecb (terminate ecb) is posted,
and I do a DISCONNECT.
Instead of the above retcode & reason code (4 & 824) I get a retcode=0
& reason code=0.
When checking with DISPLAY THREAD(*) I see my application's connection
to DB2 is still active.
Is it a bug of DB2 or am I doing something wrong?
I have also noticed that in the code example, at the end of chapter
29, when QUIESCE mode is found, nothing is done!?
It looks like a wrong behavior.
I thought that when STOP DB2 command is set, my CAF application should
DISCONNECT, to allow DB2 termination to be completed.
Then, when DB2 is up again, I shall do CONNECT again.
Please advise.
Avner