Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
Hi Rob -
Other's have suggested the %parms method. Not bad. However it is possible to have parameters missing in the middle. For example I have an old program (that I wouldn't write that way anymore, but you may like since you're into old os's) that does a RTVJOBD. Now, remember on the RTV... command set you may omit parameters, right? Right there is a classic example of parameters missing in the middle. %parms is a worthless solution if you may be missing parameters in the middle.
Those parameters are NOT missing. They DO contribute to the %parms count. The difference is that the pointer in the parameter list for an "omitted" parameter is *NULL rather than being a valid pointer.
The *NULL pointer can be tested for in a regular RPGLE program just like it can in a procedure.
So if there is any possibility of "omitted" parameters as well as parameters not passed, both %parms *and* %addr need to be checked.
Ken http://www.kensims.net/ Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind.
This mailing list archive is Copyright 1997-2026 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.