On 12 Apr 2013 14:31, John Yeung wrote:
On Fri, Apr 12, 2013 at 5:17 PM, Carel wrote:
On 12 Apr 2013 14:11, Stone, Joel wrote:
<<SNIP>> It appears that if I want to return a value, then the
value MUST be used in every call of the command. Is it possible
to make a return variable optional?

IIRC the old technique in CLP was to globally monitor for MCH3601
without doing nothing or put that MONMSG on each CMD variable in
the CLP

Not passing a PARM is not passing a pointer, which MCH3601 tells
you.

I believe the program has to be of type CLLE, not CLP. At least up
to V5R4, a plain CLP will not even run with an unpassed parameter.
(The job attempting to CALL the CLP gets CPD0172:
"Parameters passed on CALL do not match those required.")

Best I recall a CLP can be used, to be invoked by a *CMD as the Command Processing Program (CPP). The CLP can be the CPP, because the Command invocation will always pass all of the parameters, but the address is NULL for any parameter for which a CL variable was not specified. Thus any reference to the parameter in the CLP as CPP must monitor for the MCH3601. And while a global monitor might functionally provide the capability to /ignore/ the condition, to know\be-informed that the condition exists, and therefore prevent further incidents of the exception in further processing against the same parameter, it may be best to have a specific MONMSG on the first reference to the parameter.

Using the CL CALL instead of a *CMD to invoke such a CLP is an entirely different matter :-)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.