> Likewise, if the "clever person" calls the program from JCL
> with the (proposed) 10,000-character PARM and the program crashes,
> it is the caller who is at fault, neither the program nor the
> JCL converter.  But I have trouble with "intended".  A careful
> programmer should allow for the possibility that the "clever"
> user may attempt to call the program beyond the intent.  This
> should be enforced not only by documentation "I told you not
> to do that?", but by the program's checking and exiting with
> a meaningful error message when the presumed limits are
> violated.

Perhaps, but you can take it too far.  I once saw a program where,
following every GETMAIN R, the programmer was carefully checking
the return code and issuing messages if it was non-zero -- despite
the fact that GETMAIN R is documented to always return 0 (unless
CHECKZERO=YES is specified, which was not the case).  You can spend
a lot of time checking things that don't need to be checked.

Yes, a program could start with a check that the PARM length is 100
or less.  But it's redundant, needless effort when the target calling
environment guarantees this already.  The hypothetical "clever
Person" should expect that, when calling a program outside its
target environment, all bets are off.

That said, I'm certainly in favour of an expanded PARM in some form.
But not one that I know is going to break a lot of existing code
(including some that I've personally seen).

Cheers,
Allen

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to