RE: New Idea about Rpg program, copy members and RDI

[email protected]
Newsgroups gmane.comp.lang.as400.rpg
Message-ID <[email protected]>
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 <[email protected]> On Behalf Of Charles Wilt
Sent: Wednesday, December 10, 2025 11:19 AM
To: RPG programming on IBM i <[email protected]>
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 < [email protected]> 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: [email protected] To subscribe, unsubscribe, 
> or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: [email protected]
> Before posting, please take a moment to review the archives at 
> https://archive.midrange.com/rpg400-l.
>
> Please contact [email protected] for any subscription 
> related questions.
>
>
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: [email protected]
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.

Please contact [email protected] for any subscription related questions.


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

Please contact [email protected] for any subscription related questions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.