On Tue, May 06, 2025 at 09:16:22PM +0000, [email protected] wrote:
>  I'm looking for different solutions -..I have a Task (TCB) that needs to 
> wait on two ECBS -The main program issues a STIMERM as Follows: 
> . L R9,STIMER_EXIT@ 
> . STIMERM SET,ID=(2), 
> . WAIT=NO, 
> . DINTVL=DINTVL$, 
> . PARM=STIMERP, 
> . EXIT=(9) 
> . 
> The Main Task program can either call a local function via a BRAS instruction 
> or an external function via a Program Call (PC) instruction - 
> . 
> In either case when either function routine returns to the main program,
> the main program issues a WAIT on one of Two Event Control Blocks - 
> . WAIT 1,ECBLIST=STIMR_WAIT_LIST 
> . 
> The STIMR_WAIT_LIST has two ECB's; one is the Timer Expiry posted by 
> the SRIMERM Exit and the second a completion ECB posted by 
> either the BRAS local function or the PC Service Function - 

Do you really care which ECB got posted first?

I'm guessing that you want a timeout on the service being called.

One approach is to have the mainline just check if the service completion
ECB is posted, if so the service completed and you don't need to deal
with the timeout case.  If the completion is not posted (yet) then deal
with the timeout (considering that the service still might compilete at
any moment...).

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to