Use of CS for what we call "quick post" works only if the ECB is in common
storage and if the ECB is not yet waiting.
You still have to be fully prepared for it to be waiting and code to use
IEAMSXMP (or cross memory POST) when you encounter that.
It is generally not all that common to find that the ECB is not waiting, but it
certainly does happen.
We rarely find it worth the extra code and usually waste the cycles trying the
CS.
The documentation for macros such as IEAMSXMP is intended to be clear about the
level of indirection for your parameter.
I'd hope any programmer would be able to get the ECB specification right with
documentation such as:
ECB=xecb
is the name (RS-type), or address in register (2)-(12), of
a required fullword input which is the ECB to post.
So if you specify a "name", it is the field name of the ECB (it's up to you to
have provided addressability).
You'll see that the expansion takes the address of what you specify.
If you specify "address in register", then you have provided the address of the
ECB. You'll see that the expansion takes the contents of the register.
The documentation for older macros such as POST is weak in that regard.
Contrast the ECB=xecb documentation above with the doc for the ECB positional
parameter of POST:
ecb addr
ecb addr: RX-type address, or register (2)-(12), except (10).
-and-
ecb addr
Specifies the address of the fullword event control block representing the
event.
Do you specify the ECB itself? Do you specify a word containing the ECB
address? What do you put into the register if using register form?
This problem is pervasive.
Since it's unlikely that this pervasive problem will be fixed in the broad
sense (an individual case will be addressed if complained about, I'd think),
you should be in the habit of looking at the expansion and giving a modicum of
thought to what is going on. Clearly a service that is going to update an ECB
needs, on input, the address of the ECB, not its contents.
If the register form is going to have the address of the ECB, then the
expansion for non-register will take the address of what you specify and pass
that.
So if you specify the ECB itself, such as ECB=MYECB, you'll get the address of
MYECB passed, and you'll be good.
If you specify something that contains the address, such as
ECB=ADDRESS_OF_MYECB, you'll get the address of ADDRESS_OF_MYECB. Things won't
go well.
Peter Relson
z/OS Core Technology Design
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN