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



If the parameter is a *optional parameter, you have to use %parms() to
check if the parameter is passed by the caller.
If the parameter is a *omit parameter, you have to use %addr() to check
if the parameter is passed by the caller.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Arthur.Marino@xxxxxxxxxxxxxxxx
Sent: Thursday, March 20, 2008 1:00 PM
To: RPG programming on the AS400 / iSeries
Subject: RPG-ILE Service Pgm and Parameter Passing

I'm testing the proc in a service pgm that defines 3 parms, all of which
are 10 bytes, alpha and "const". The last 2 have "options(*nopass)".
I'm testing for the presence/absence of the last 2 parms using
%addr(parm) equal/not equal to *null.
I have the main pgm call the proc twice, once with all 3 parms present
(x = proc(p1:p2:p3)), the second time with only the 1st parm present (x
= proc(p1)). In debug, the 2nd invocation of the service pgm proc shows
the 2nd and 3rd parms containing the data from the 1st invocation. Since
I didn't pass those parms in the 2nd invocation, shouldn't they be
undefined??? If not, how does one have the proc function differently
based on the number of parms passed? Do I have to check the %parms BIF?
If that's the case, what exactly is %addr(parm) good for?

Arthur J. Marino
Southern Container Corporation
(631) 297 - 2276
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.


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.