Re: New IBM idea - Named Parameters at Program and Procedure Calls
Daniel Gross <[email protected]> Sat, 28 Feb 2026 18:31:55 +0100
| Newsgroups | gmane.comp.lang.as400.rpg |
|---|---|
| Message-ID | <[email protected]> |
Well - yes - "associative arrays" or "dynamic data structures" would be nice to have - but I don't hope for it. RPG is a quite statically typed language - and memory management is also quite static. So Birgittas (and my) idea doesn't target the memory management - or dynamic runtime structures - it's just "syntactic sugar" completely isolated in the compiler. The parameters are still passed the same way as with positional parameters - only that omitted parameters are completely omitted on the caller side and not marked with *OMIT. But for the called procedure, everything looks exactly the same - whether the caller uses keyword/named parameters or positional parameters. For real dynamic data, I also pass large VARCHAR parameters with JSON inside. Pretty easy to create with SQL - and also pretty easy consumed with SQL. Sometimes I even use JSON strings as a pretty good replacement for data structure arrays - especially as you can not have dynamic arrays (*AUTO) in dynamic arrays. Kind regards, Daniel > Am 28.02.2026 um 17:57 schrieb Stephen Richter <[email protected]>: > > heck, enable RPG to have dynamic data structures. Just like a javascript > object. Then, each named parameter is a property ( sub field ) of the > dynamic data structure. And like javascript, the sub field of the dynamic > data structure can be whatever data type of the value assigned to it. > > to call a program with a named sub field: > > CALL OE530R PARM( { company: 01, ordnum: [123, 345]}) > > -Steve > > >> On Fri, Feb 27, 2026 at 2:45 AM Birgitta Hauser <[email protected]> >> wrote: >> >> 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 >> >> 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 <[email protected]> On Behalf Of Barbara >> Morris >> Sent: Thursday, 26 February 2026 18:50 >> To: [email protected] >> Subject: Re: CCSID - RPG issues >> >>> On 2026-02-26 8:40 a.m., Birgitta Hauser wrote: >>> SQL could always handle single byte and double byte character sets ... >>> and >>> UTF-8 correctly. Transformation occurred automatically. >>> The problem was always RPG because the data is converted into the Job >> CCSID. >>> BTW what is your Job CCSID? 65535? >>> >> >> He has DATA(*NOCVT) for the file and CCSID(*EXACT) for the data structure, >> so it should not be converting the data to the job CCSID. >> With DATA(*NOCVT), it should get the data correctly even if the job CCSID >> is >> 65535. >> >> -- >> Barbara >> >> -- >> 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. > -- 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.