On 5/5/2012 8:43 AM, Charles Mills wrote:
I have a situation in which it would be a wonderful thing if I could have multiple tasks waiting for a single event, without having a separate "wait control block" of some sort for each task.
This is supported on z/VSE.
Why? I have no control over what the tasks "have" in advance (system exit situation) and doing a GETMAIN or the like so that each task could have its own ECB, and then chaining them all together, following the chain with POSTs, FREEMAINs, etc., etc., would be a real pain, a lot of overhead, and a real risk of mucking it up. I know WAIT/POST/ECB does not support multiple tasks waiting on a single ECB. I guess that EVENTS does not support this either -- but I don't see it explicitly in the documentation -- is my assumption correct?
There is no support in z/OS for what you want.
Is there any other way to do this? Some clever use of ENQ or something like that? Some other z/OS "wait" service besides WAIT and EVENTS?
You must build your own queue of requesters (LIFO is the easiest to create, but FIFO is the best way). I recommend a CPOOL.
When the ECB gets posted, pull an entry from your queue and POST, RESUME, or IEAVRLS the waiting unit of work. Continue for every entry on the queue until exhausted.
Note that a similar (but opposite) issue exists for not being able to wait on multiple events with IEAVPSE.
-- Edward E Jaffe Phoenix Software International, Inc 831 Parkview Drive North El Segundo, CA 90245 310-338-0400 x318 [email protected] http://www.phoenixsoftware.com/ ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN

