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



I also disagree.

To think of one instance, we have a procedure in a service program that is probably called in around 75 different programs. That procedure has a few parameters at the end that some programs care about and some do not. Personally I'd rather have the programs that don't care to not supply 'dummy' parameters. Another option would be to create a separate wrapper procedure, but why go through all of that effort and introduce a new layer when there's a pretty basic parameter option to be used? However, when using 16 of them, it can get unwieldly....

Sure, it's the exception that I have a procedure with *nopass or *omit, but I definitely would not shy people away from them. Better to say, "If you're going to use it, understand it."

-Kurt

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: Tuesday, March 08, 2011 3:28 PM
To: RPG programming on the IBM i / System i
Subject: Re: Calling similiar (overloaded) procedure that has *nopass *omit in the parameter

I disagree...

I think they make lots of sense for public functions...especially if you've got other teams that may make use of them..

But in my protected or private procedures, I don't use them.

Charles

On Tue, Mar 8, 2011 at 3:12 PM, Mark S. Waterbury <mark.s.waterbury@xxxxxxxxxxxxx> wrote:
I think you should strive to avoid using *OMIT and *NOPASS; do not
design or write any new code that requires their use (e.g. in your own
procedures); -- only use them when absolutely necessary (e.g. when
calling some IBM APIs or some other vendor code that requires this.)

That's my opinion, and I'm sticking to it. ;-)

HTH,

Mark S. Waterbury

 > On 3/8/2011 11:44 AM, hockchai Lim wrote:
Assuming that proc1 is an overloaded procedure of proc2.  Proc1
contains no business logic.  All it does is converting the parm1 into
alpha and calls proc2.  As you can see, both parameter 2&  3 in
proc1&  proc2 are *nopass and *omit type parameters.  Can someone
give me a pointer on best approach on calling proc2 from proc1?



D proc1           pr
D  parm1                        10p 0 D  parm2                        
10    options(*nopass :*omit)  const D  parm3                        
10    options(*nopass :*omit)  const

D proc2           pr
D  parm1                        10
D  parm2                        10    options(*nopass :*omit)  const
D  parm3                        10    options(*nopass :*omit)  const


--
This is the RPG programming on the IBM i / System i (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.


--
This is the RPG programming on the IBM i / System i (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.