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



Not a showstopper by any means, more out of morbid curiousity. RPGLE V5R4
(but may still exist at higher versions). Consider the example program:

d ExecCmd pr extpgm('QCMDEXC')
d CmdString 3000a const options(*varsize)
d CmdStringLen 15p 5 const
d CmdOption 3a const options(*nopass)
/free
command = 'ovrdbf file(myfile) tofile(loyd/myfile)';
execcmd(command:%len(%trim(command)));
*inlr = *on;
return;
/end-free
There is an intentional syntax errror: the variable "command" is not
defined. The gist is using a prototyped call. QCMDEXC and the command to
execute are arbitrary and serve as examples only.

When compiled, these messages are generated:
*RNF7030 The name or indicator COMMAND is not defined. [expected]
*RNF7503 Expression contains an operand that is not defined. [command=...]
*RNF7503 Expression contains an operand that is not defined. [execcmd(...]
*RNF5410 The prototype for the call is not defined. [Huh??]

Why does RNF5410 occur? The prototype definitely exists. Without it, these
compile messages occur:
*RNF7030 The name or indicator COMMAND is not defined. [expected]
*RNF7030 THe name or indicator EXECCMD is not defined. [expected]
*RNF7503 Expression contains an operand that is not defined. [command=...]
*RNF7503 Expression contains an operand that is not defined. [execcmd(...]

The RNF5410 is just out of left field to me. I'm curious as to the rationale
of this erroneous (in this instance) error. Is the compiler saying that
because an argument is not defined, it can't execute the prototyped call?
That makes more sense to me than saying the prototype does not exist.

--Loyd

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.