In the OP's case, he does not get control in order to issue the DETACH - the
DETACH is issued by the system when the JS ends. 

Also, the DB2 messages are not issued by an ESTAE - it is by the DB2 RTM. It
would be quite tricky to get DB2 to skip the RTM routine.

It appears that there are two issues - 

(1) to prevent the JS from the X03 abend
(2) to avoid the messages from the subtask

There is the requirement that the JS black box not be altered

One option would be to replace the JS in the JCL to attach a new task that
attaches the original JS task and ends when it does. Then the service
subroutine can run in the new JS task and will clean up when the original JS
ends.

Even a LINK may be adequate.


On Thu, 16 Oct 2014 14:40:52 -0400 David Cole <dbc...@colesoft.com> wrote:

:>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

--
Binyamin Dissen <bdis...@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to