HI Brad,

Hopefully blizzard does not cause communications downtime!

Scott's example at https://www.scottklement.com/presentations/Overloading%20Subprocedures%20in%20RPG.pdf actually does have one procedure with multiple parameters -- format_message can have 3, it just happened that the 2nd and 3rd have options(*bypass).

It looks like your example should work just fine.

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx
pdow@xxxxxxxxxxxxxx t/


On 1/14/2024 2:11 PM, Brad Stone wrote:
So, I decided to start digging into this. It looks pretty cool. Thanks for
the examples online (Scott!)

I have yet to find any examples with more than one parameter, so here is my
question....

Can you overload with multiple parameters where one or two are different?
Like this to retrieve an invoice or PO:

dcl-pr getInvoice int(10);
In_ID char(128) const;
Out_Invoice likeds(invoiceDS) options(*exact);
end-pr;

dcl-pr getPO int(10);
In_ID char(128) const;
Out_PO likeds(poDS) options(*exact);
end-pr;

dcl-pr getData int(10) Overload(getInvoice:getPO);

So you could do something like:

dcl-ds thisInvoiceDS like(invoiceDS) end-ds;
dcl-ds thisPODS like(poDS) end-ds;
dcl-s rc int(10);

rc = getData('10':thisInvoiceDS);
rc = getData('10':thisPurchaseOrderDS);

>From what I'm reading this should work.

Blizzards are fun. Downtime = exploring time. :)


Bradley V. Stone
www.bvstools.com
Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any Cloud
Provider!

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.