Is the 1st task, the one with the existing DB2 connection, your task?
Do you have control of it, or is your code running on a tcb that is not
your code?
On 10/16/2014 1:00 PM, Victor Gil wrote:
Hi everyone,
Working on a general purpose callable subroutine to connect to a remote DB2
subsystem and return values back to the caller.
Since the caller may [and WILL] have established its own DB2 connection to a
local DB2 subsystem, possibly with some cursors open and DB2 locks acquired,
the subroutine must run under a different TCB.
I have no problems attaching a subtask on a first call and connecting from it to a remote
subsystem, but I cannot force the caller [because this would mean massive change to the
existing source code] to also call me with the "end-of-job" request, so that I
can properly detach the subtask.
And if it is not detached the main task will surely get abended. [By the way -
can't this get trapped by an ESTAE(X) and converted into RC=0?]
Given the above scenario - does anyone have a suggestion on how to quietly
terminate both tasks without the detach? Or maybe a suggestion on ANOTHER way
of implementing the required functionality?
Many thanks in advance!
-Victor Gil-
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN