It’s possible that the program he is trying to call is an OPM program, or an ILE program that was compiled using CRTBNDRPG.
In the first case, only CALL can be used. In the second, he could use DSPPGM to find out the procedure names and try those — but best to just use CALL rather than CALLP. It’s obvious that the called program was not written with procedure-type calls in mind.
I don’t use free-format RPG, so I am not sure whether CALL with a parameter list is supported inside it — he may have to drop out of free-format to do the CALL.
CallP can be used for programs or procedures, OPM or ILE. If it’s a prototyped call, then CallP is necessarily required.
The problem is that the procedure prototype definition is wrong (or the CRTRPGMOD or CRTBNDRPG is wrong). The <help> text for the message tells what needs to be done. View the compiler spooled file in SEU, have SEU locate the error by entering “*err” in the SEU command area and press <Shift-F4> (or <F16>). When the RNF3751error is located, place the cursor on the message and press <F1>. The <help> text will show:
Cause . . . . . : The procedure specified on the prototype definition for
the main procedure must be the same as the program or module being created.
The name specified on the prototype definition is the value of the EXTPROC
keyword, or if the EXTPROC keyword is not specified, it is the name in
positions 7 – 21, in uppercase. The procedure interface definition is
Recovery . . . : Change the external name specified on the prototype or
specify a different name on the CRTBNDRPG or CRTRPGMOD command. Compile
Or you could always just look up the message identifier in the message file. These compiler messages are in message file QRPGLEMSG in library QDEVTOOLS.