Re: New IBM idea - Named Parameters at Program and Procedure Calls

Peter Dow <[email protected]> Fri, 27 Feb 2026 07:02:27 -0800
Newsgroups gmane.comp.lang.as400.rpg
Message-ID <[email protected]>
I don't think Birgitta was advocating replacing the current method of 
passing parameters, more like providing another method.

One advantage of the new method is that if a new parameter is added, it 
would not affect other programs using the same named-parameter method.

On 2/27/2026 6:52 AM, Luca Giammattei wrote:
> Il 27/02/2026 08:44, Birgitta Hauser ha scritto:
>> I have added a new IBM idea, to allow specifying Parameter Names (and
>> assigning the parameter values) at program/procedure calls (in the 
>> same way
>> as you can do it with SQL Stored Procedures, UDFs and UDTFs)
>> https://ideas.ibm.com/ideas/IBMI-I-4826
>>
>> Please LIKE if you think it would be helpful/useful
>>
>
> Interesting idea, although one of the things I've always loved about 
> our compiler's parameter management style is that it doesn't care 
> about their names; what really matters is their nature and order. So I 
> don't see it as easy to implement in contexts with legacy code or even 
> a mix of legacy and free. Perhaps it should be limited to the fully 
> free language, and even here I'm not sure. I wouldn't want to be 
> constrained by the parameter name rather than its nature, even though 
> today, when everyone programs with advanced tools like VS Code or RDi 
> (right?), managing these aspects is much simpler.
>
> What if the parameters are also used to pass messages from one program 
> to another? Nothing would change, right?
> I'm thinking of the case where pgm1 calls pgm2, passing it two 
> parameters: one containing data to be used within pgm2's processing 
> and the other as a sort of return code for the outcome of the processing.
>
> something like
> foopgm(parm1:rtncode);
> if rtncode=*blanks;
> //successful execution
> elseif rtncode <> *blanks;
> //something went wrong, let's log the error
> endif;
-- 
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: RPG400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related questions.