The "correct" way to do it would be to have the prototype in a /copy member and include it in both the calling and called program.

Here's one of a n umber of articles on the topic I have written https://www.mcpressonline.com/programming/rpg/prototypes-for-all-calls-all-the-time <https://www.mcpressonline.com/programming/rpg/prototypes-for-all-calls-all-the-time>

The one change since that was written is that the inclusion of the Pr in the called program is no longer compulsory - but is still highly recommended.



On Jun 23, 2020, at 11:41 AM, Howie, Bill <BHowie@xxxxxxxxxxxxxxxx> wrote:

Hello all,

I know this is probably more appropriate for the RPG list but I'm not subscribed to that one at the moment. I'm working on putting a call to an external program inside a completely free-format RPG program. The program has more than 10 parameters. We are on version 7.3. I'm trying to understand whether both the DCL-PR and DCL-PI are needed. I'm thinking that the PI is not needed. When I do my call to my external program, do I reference the parameters in the "PR" section or do I have to create another set of variables? I've done some looking online and it's hard to determine what all is necessary. Any info would be most appreciated. Thanks!

dcl-pr lb002 extpgm;

serial packed(11);
format char(3);
partnumber char(20);
lotnumber char(15);
quantity packed(15:5);
unit char(3);
source char(3);
multiples packed(3);
ordernumber packed(9);
orderitem packed(3);
orderrelease char(8);
bolnumber packed(9);
bolitem packed(3);
reference char(20);
print char(1);
outq char(10);
mst# packed(11);
kanb char(15);
ran# char(20);
workorder char(10);
pcksz packed(15:5);
mode char(1);
status char(1);
wipseq packed(3);
labelcount packed(5);
futfield char(100);
pcntr char(3);
pcnbr packed(10);

end-pr;


[Related image]<https://www.hc-companies.com/>Bill Howie
Senior ERP Programmer/Analyst
Direct: 330.487.3739 | Cell: 330.888.8085 | Toll Free: 800.225.7712
2450 Edison Blvd, Suite 3, Twinsburg OH 44087
hc-companies.com<https://www.hc-companies.com/>
Leader in Horticultural Containers
[cid:image003.png@01D64953.4BC6C7C0]<https://www.linkedin.com/company/the-hc-companies> [cid:image004.png@01D64953.4BC6C7C0] <https://www.facebook.com/HCCompanies/> [cid:image005.png@01D64953.4BC6C7C0] <https://www.instagram.com/hccompanies/> [cid:image006.png@01D64953.4BC6C7C0] <https://twitter.com/hc_companies>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.