There is still no such thing as a count of parameters that I remember, so put a MONMSG MCH3401 (MCH3601? I forget which) after the first use of the optional parameters, then use a GOTO to skip around the new code. There might also be some newer commands for handling errors since V5R3 and up - not sure. Thought I'd seen something about DO WHILE that involved message IDs once at COMMON. But don't quote me on that.

HTH
Vern

Simon Coulter wrote:
On 28/09/2009, at 10:51 PM, Mike Cunningham wrote:

Is there any way to keep a CL program from failing if too few parameters are passed like you can in RPG by detecting the number of parameters with %parms() and then not referencing the missing parameter(s) if they were not passed? I have a CL program that is called from about 50 other applications and I need to add a new parameter for just one new function to be used currently in one application.

Make it a CLLE program.

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2019 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].