I have done the function thing in copybooks when the function needs to adopt ALLOBJ authority. If I put the function in a service program and the service program adopts ALLOBJ authority, anybody can bind to that service program and call the function with ALLOBJ authority. Maybe there is a way for service programs to adopt the authority of the *PGM that is calling functions in it but I wasn't able to figure it out.

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Charles Wilt
Sent: Wednesday, December 10, 2025 11:19 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: New Idea about Rpg program, copy members and RDI

Why would you have functions in a /COPY member?

I mean, I've seen it done by people that don't understand ILE in code I've inherited...

But IMHO, it's a very bad practice.

Charles

On Wed, Dec 10, 2025 at 9:01 AM Marco Facchinetti < marco.facchinetti@xxxxxxxxx> wrote:

Cross posted in Wdsc list.

In an effort to reduce duplicate code between similar programs with
different purposes, we use copy members to contain the common parts.
These include definitions, but also routines and functions.
When editing copy members, the content assistant doesn't work because
it doesn't have the context. Hence the idea of being able to edit copy
members directly in the main source code:

https://ibm-power-systems.ideas.ibm.com/ideas/IBMI-I-4740

Best regards
--
Marco Facchinetti

Mr S.r.l.

Tel. 035 962885
Cel. 393 9620498

Skype: facchinettimarco
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



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