When you attach the subtask, specify ESTAI=whatever.
When you force DETACH the subtask, the ESTAI will get control. One
thing about ESTAIs (that's not true for ESTAEs) is that they can
return to RTM with RC=16 (via SETRP of course). This means "don't
percolate the abend any further. Just go quietly into the night. Do
not rage rage against the dying of the light".
IHTH,
Dave Cole
At 10/16/2014 02: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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Dave Cole
ColeSoft Marketing
414 Third Street, NE
Charlottesville, VA 22902
EADDRESS: <mailto:dbc...@colesoft.com>dbc...@colesoft.com
Home page: www.colesoft.com
Facebook: www.facebook.com/colesoftware
YouTube: www.youtube.com/user/colesoftware
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN