Two rather different situations need to be distinguished  here.  There
is 1) the case of code that always executes a STORAGE OBTAIN (or
GETMAIN) requesting zero bytes of storage, and there is 2) the case of
code that executes a STORAGE OBTAIN (or GETMAIN) for a calculated
number of bytes B, where B=0 is possible but [presumably] rare.

For the first case an ABEND would be appropriate; for the second, not.
 Unfortunately, there is no way for a STORAGE macro definition to be
coded to make a distinction of this sort, which is outside its
purview.  We are left with Bill Fairchild's suggestion: Make such
distinctions in your own code.

My personal view is that the original design decision was not a bad
but a good one.  I understand Jim Mulder's view.  Caricatured only a
little, it is that the incompetent must be protected from the
consequences of their follies.  I disagree, but I of course do not
have to deal with flack from these people, and he does.  I prefer
designs that behave appropriately ands coherently at boundary values.
It should be possible to allocate zero bytes of storage, concatenate a
string of length zero bytes to another one, etc., etc.

John Gilmore, Ashland, MA 01721 - USA

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

Reply via email to