× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Vern,

Not sure about CL, but I've coded RTV* commands with C program as a CPP. I
just had to check for NULL in input arguments.
I'm pretty sure that's where the MCH3601 is coming from, i.e. referencing a
NULL (uninitialized pointer) argument.
I don't know if there is a way to test for an uninitialized pointer in CL
other than how David is already doing it, but there probably is a nicer way
in RPG.

Elvis

Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com


-----Original Message-----
Subject: Re: CLLE optional parameters?

Nothing wrong with doing this = just know why you need to. I've used
this technique when working with several RTNVAL parameters on a command
- so that not all of them have to be passed in. Basically, this is like
the old *PARMS value - check how many you get - but it's possible with
the CL thing to skip any of the parameters, not just the last ones in line.

Now if anyone knows another way to avoid having to pass all parameters
to a RTV* command - as IBM's work - let me know - other than monitoring
for MCH3601. The documentation for this parameter of the PARM statement
for commands says -

"A CL variable name must be specified (on the CALL command) to receive
the value."

Not sure why it says "...the CALL command..." but not to worry - it is
assuming you have to pass all of the RTNVAL parameters, if specified.
But the IBM commands don't behave that way, and checking MCH3601 takes
care of it - until I find a better way.

Oh, David - if you DO monitor for MCH3601 - be sure to clean up after
yourself - do a RCVMSG RMV(*YES) on it right away in a DO/ENDDO block.

HTH
Vern




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.