So, our application uses CAF to communicate with DB2 and we use the DSNALI module.
We use the DSNALI function 'OPEN' to connect to DB2, using the specified subsystem and plan. If the OPEN fails (like an invalid plan was specified), the TCB created contains information from the failed OPEN and that is causing other problems.
For example, if the OPEN fails while connecting to subsystem 'A' (which is valid) using plan 'BOGUS' (which is invalid), a return code of '8' is returned by CAF with a reason code of '00F30034'. Cool.
If we then try to open a NEW connection to DB2 using subsystem 'B' (which is valid but on another system) using plan 'GOOD' (which is a valid plan), a return code of '200' is returned with a reason code of '00C10208'.
In an attempt to "gracefully" recover from the initial failed OPEN, we have tried to use the 'CLOSE' and 'DISCONNECT' functions but those fail as well. When we use the 'CLOSE' function, a return code of '200' is returned with a reason code of '00C10203'. When we use the 'DISCONNECT' function, a return code of '200' is returned with a reason code of '00C10204'.
I have found the explanations of the various reason codes we're getting:
IBM Information Management Software for z/OS Solutions Information Center
but what I haven't found is how to effectively "reset" CAF when a failed OPEN attempt is encountered.
We're using DB2 V8.1 on z/OS.
Any ideas?
Thanks!
Peace...