Barbara, you seem to have to answer this question every 2-4 years.
Any chance you can talk someone into updating the IBM documentation to clarify the issues?
Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Barbara Morris
Sent: Wednesday, January 31, 2018 3:33 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Checking for missing parameters in CL
On 2018-01-31 12:14 PM, Tyler, Matt wrote:
We were told that MCH3601 was not as reliable as using CEETSTA API
...
I think MCH3601 works well if you document that you never intend to have *NULL as a valid value passed to a param.
For a bound call, it's not safe to rely on MCH3601 to detect unpassed
parameters. If there happens to be a pointer on the parameter stack from
some previous call, your procedure wouldn't get an error if it tried to
access the unpassed parameter. Testing %addr wouldn't be reliable either.
I think it's ok for a program call because (I assume, but don't know for
sure), that the ILE CL program-entry-procedure initializes all the
parameter pointers to either null or the address of the passed parameter
before it calls the procedure.