× 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.



Douglas Handy wrote:
> 
> Why? If you use CALL in RPG/400 and call another RPG program and pass more
> parameters than it expects, the call stack can get extra entries but the
> subprogram will typically just ignore them. True, you *could* have the
> program test the parameter count and if over the number expected issue an
> error. But do you write your programs that way? I test the parm count when I
> want parms to be optional, but only to safeguard references to unpassed
> values. I don't ever recall checking and issuing an error when too many are
> passed.
> 

With RPG/400 you can pass fewer parameters than the program expects, but
you can't pass more.  With ILE RPG, you can pass more than it expects
and there will be no error.

DSPPGM shows the minimum and maximum parameters that can be passed to a
program, from the system's point of view.  If you have 3 parameters in
your *ENTRY PLIST, DSPPGM will show 0 and 3, and ILE RPG will show 0 and
255.  (I'm not sure why ILE RPG behaves this way ...)


As an Amazon Associate we earn from qualifying purchases.

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-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.