If I understand correctly, you may be conflating two issues. (Although I agree 
with you 100% on the philosophy of special cases.)

The distinction Peter was making was between the ECBLIST= form of WAIT, which 
supports multiple ECBs, versus the simpler and easier-to-use and therefore 
worthwhile ECB= form, which supports only a single ECB.

That is distinct from the "number of events" parameter, which says how many of 
the specified events must complete in order for the WAIT to be satisfied. WAIT 
1,ECBLIST=many ECB's is a common (the most common?) usage and is completely 
supported.

I have no idea whether WAIT 0 (which is documented as being valid) works as you 
would prefer, nor whether z/OS diagnoses the "impossible" case in which the 
number of events is greater than the number of ECB's, or just waits forever for 
Godot who never arrives. (They do document it as invalid.)

Not sure where you get "9" from; perhaps I am missing something in the 
documentation.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Paul Gilmartin
Sent: Monday, June 22, 2015 11:06 AM
To: [email protected]
Subject: Boundary (was: Wait forever)

On Mon, 22 Jun 2015 07:38:39 -0400, Peter Relson wrote:

>I was curious why you used WAIT with ECBLIST when there was only one ECB.
>
I'm an advocate for uniform and continuous treatment of boundary cases.  If I 
were coding an interface to WAIT, I'd prefer not to need to treat "1" as a 
special case.  In fact, I'll even argue that for "event nmbr"=0 WAIT should 
immediately and normally exit.

>From the Macs Ref.:
       event nmbr,      event nmbr: Symbol, decimal digit, or register (0) or 
(2) - (12).

Hmmm... does this imply that for the second form, "event nmbr" is limited to 9?
(But it does not prohibit 0?

In real life, not hypothetical, I was considerably irritated when I coded an 
interface to BPXWDYN(CONCAT ... ) and discovered that I must treat "1" as a 
special case.

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

Reply via email to