Why does it matter which posted first? Say the timer pops first but by the
time you get dispatched the work also posts. Do you really care?

But to your issue - the STIMERM exit can examine the work ECB to see if it was
posted and take different action, But as the UOW is not disabled/locked, it is
quite possible that right after you check the situation changed.

I have some XM code that has this issue, so I define a word associated with
the work request with bits indicating status and use CS to update the status.
So if you had bits for timedout and workdone, fetch the word, examine it, set
the new value and CS it in. Of course it cannot be freed until both things
have looked at it, so you need an ETXR/RESMGR to cover worst cases.

On Tue, 6 May 2025 21:16:22 GMT "[email protected]" <[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 - 
:>. 
:>My confusion is how to determine which ECB got posted first without 
:>developing any complicated code. I can test each ECB for the post 
:>bit, and set a switch in the STIMERM Exit Routine to indicate 
:>the function has Timed out (EXPIRED). 
:>. 
:>The completion ECB could be posted after the Expiry ECB meaning the 
transaction timed out - 
:>. 
:>Are there any recommendations/guidelines/suggestions, 
:>to determine which ECB has been posted first? 
:>.paul dangelo
:>.
:>.  
:>
:>----------------------------------------------------------------------
:>For IBM-MAIN subscribe / signoff / archive access instructions,
:>send email to [email protected] with the message: INFO IBM-MAIN

--
Binyamin Dissen <[email protected]>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

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

Reply via email to