REQPREXP(*NO | *WARN | *REQUIRE)

The REQPREXP keyword specifies whether prototypes are required for the main procedure and exported procedures.

*NO
Prototypes are not required for the main procedure or exported procedures. This is the default.
*WARN
A severity-10 warning is issued if a prototype is not specified for the main procedure or an exported procedure.
*REQUIRE
A prototype is required for the main procedure and exported procedures. A severity-30 error is issued if a prototype is not specified for the main procedure or an exported procedure.

The REQPREXP keyword overrides the value set by the REQPREXP parameter for the CRTBNDRPG or CRTRPGMOD command.

Tip: If you know that a prototype is never needed for a particular exported procedure, you can specify REQPROTO(*NO) on the statement that begins the procedure or on the procedure interface if it is the cycle-main procedure.
For example
  • A program that is only intended to be used as the command-processing program for a command does not need a prototype to enable other RPG programs to call it.
  • A Java™ native method is usually called only from JavaJava methods, so most JavaJava native methods do not need a prototype for RPG callers.

See REQPROTO(*NO) for exported procedures and REQPROTO(*NO) for the procedure interface of the cycle-main procedure.