Re: New IBM idea - Named Parameters at Program and Procedure Calls
Eric Wesson <[email protected]> Fri, 27 Feb 2026 20:54:18 +0000
| Newsgroups | gmane.comp.lang.as400.rpg |
|---|---|
| Message-ID | <DM6PR05MB6780F2CBE090AC6BBE5ED0E6C373A@DM6PR05MB6780.namprd05.prod.outlook.com> |
Great idea ________________________________ From: RPG400-L <rpg400-l-bounces-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org> on behalf of Birgitta Hauser <Hauser-bRAHsVz2yv4TVIZRl6KS/[email protected]> Sent: Friday, February 27, 2026 11:31 AM To: 'RPG programming on IBM i' <[email protected]> Subject: RE: New IBM idea - Named Parameters at Program and Procedure Calls 1. It works in SQL without any problems (that's why I used the SQL Syntax as proposal). 2. In SQL you can mix the old and new Style, i.e. simply listing the parameters or using the argument list and even mixing both. So, why not providing the same type of parameter passing to RPG procedures. Have you ever had to work in a new/old/grown over the time environment where procedures with x parameters are called as follows: Procedure(Fld1, *Blanks, '', '0', *Zeros, '0', '1', *Blanks, *Blanks, *Blanks, *Blanks, 'ABC', Fld7); Also have you ever been in a situation where you only have to pass the first and then the 17th parameter? No Documentation, why code is self-describing! Mit freundlichen Grüßen / Best regards Birgitta Hauser Modernization – Education – Consulting on IBM i Database and Software Architect IBM Champion since 2020 "Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown) "If you think education is expensive, try ignorance." (Derek Bok) "What is worse than training your staff and losing them? Not training them and keeping them!" "Train people well enough so they can leave, treat them well enough so they don't want to. " (Richard Branson) "Learning is experience … everything else is only information!" (Albert Einstein) -----Original Message----- From: RPG400-L <rpg400-l-bounces-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org> On Behalf Of Luca Giammattei Sent: Friday, 27 February 2026 15:52 To: [email protected] Subject: Re: New IBM idea - Named Parameters at Program and Procedure Calls 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fideas.ibm.com%2Fideas%2FIBMI-I-4826&data=05%7C02%7C%7C4e1e838e4e6748523dab08de7626065b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C639078102855918128%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=DsVcULZm2FnwLEZwEjW2Twjh0jLGsmKSVt3FNC3VMuk%3D&reserved=0<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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Frpg400-l&data=05%7C02%7C%7C4e1e838e4e6748523dab08de7626065b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C639078102855947072%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=SjRsjH9p1QOwPHclZPzwdpTfLLt0En4%2FhKmT38VQ1xo%3D&reserved=0<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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Frpg400-l&data=05%7C02%7C%7C4e1e838e4e6748523dab08de7626065b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C639078102855968857%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=vArJY8Qy9aB4ZrMxuzqgUmZz4oQJWGlY625zWOd3sLM%3D&reserved=0<https://archive.midrange.com/rpg400-l>. Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Frpg400-l&data=05%7C02%7C%7C4e1e838e4e6748523dab08de7626065b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C639078102855989858%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=fwYSDdLNCxg9VzwSlNGHP22naFOeMiRiU2oFWPoJ5OI%3D&reserved=0<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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Frpg400-l&data=05%7C02%7C%7C4e1e838e4e6748523dab08de7626065b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C639078102856010968%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=REtQ1619%2BTVL3UX0SY9pea5dpQHV1Kdzpii%2Bqt63%2FTE%3D&reserved=0<https://archive.midrange.com/rpg400-l>. Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org 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: 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.