× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 6/27/2013 4:12 PM, Booth Martin wrote:
There are many programs, with new programs added regularly, that all use
the same *ENTRY/PLIST. This seems a great candidate for developing a
PR/PI copy member for future programs.

Here is the stumbling block for me. I don't know how to handle the
EXTPGM() keyword. The external program will vary , depending on what the
program using the PR/PI is doing. I tried using a variable name in the
extPgm(TRGTPGM) but that did not compile.


I don't think it's a good idea to use the same prototype for multiple programs. You wouldn't be able to use the prototype to call the programs.

I guess you could use a /copy file for the parameters of the PRs. And possibly for the PIs, but I like to see the PI parameters right there in the source.

If there was some reason that the programs all _had_ to have the same parameters, then putting the PR parameters in a /copy file would be good. But I'd still explicitly code the parameters for the PI.

Parameter copy file STDPARMS:
* Standard parameter list for programs X Y Z
D parm1 10a
D parm2 5p 0 const

Prototype copy file STDPROTOS:

D x pr extpgm('X')
/copy STDPARMS

D y pr extpgm('Y')
/copy STDPARMS

D z pr extpgm('Z')
/copy STDPARMS

Source for program X

/copy STDPROTOS
D x pi
D parm1 10a
D parm2 5p 0 const
...


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.