× 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.



Tim Kredlo wrote:
Issue:  When I attempt to define the prototype 'Called' with
EXTPGM(Called) I get the following error at edit (not compile) time:
                "The parameter for keyword EXTPGM is not valid; keyword
is ignored."
Changing to EXTPGM('Called') removes the error, but won't that cause the
compiler to look for a program named 'Called', rather than the one named
the value that the variable "Called" holds?

It seems that the error occurs when the prototype internal name is the
same as the un-quoted EXTPGM name. Using 2 variables holding the same
value seems to be a potential 'kludgy' work-around. ( D Called
PR               EXTPGM(CldPgm)       )

Is this the correct solution to this problem?

Yes, that's the correct solution.


For example:
==================================================
D pgm             pr                  extpgm(name)
D name            s             10a
 /free
    name = 'MYPROG';
    pgm();
    *inlr = *on;
 /end-free
==================================================

In this example, you call the program by the name of the prototype. But the name of the program being called is given in the variable "name".

That is, you declare two things: 1) the prototype for the program to call ("pgm"), and 2) the actuall name of the program ("name").

Cheers! Hans



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.