REQPROTO(*NO)

You can specify keyword REQPROTO(*NO) for an exported procedure to indicate that a prototype is not required for the procedure even if the REQPREXP Control keyword or the REQPREXP command parameter indicate that warnings or errors should be issued if there is no prototype for an exported procedure.

*NO
When REQPROTO(*NO) is specified, no warning or error is issued if there is no prototype for the procedure.

The REQPROTO keyword only has meaning for exported procedures, but it is allowed for any procedure.

Note: This keyword is also available for the Procedure Interface of a cycle-main procedure. See REQPROTO(*NO).

Example

In the following example
  1. REQPREXP(*REQUIRE) is specified in the Control statement, indicating that prototypes must be specified for exported procedures.
  2. A prototype is specified for procedure P1 and P2. No prototype is specified for procedures P3 and P4.
  3. Keywords EXPORT and REQPROTO(*NO) are specified for P1.

    Keyword REQPROTO(*NO) is allowed, but it is not needed because a prototype is specified for P1. A compile error is not issued for P1.

  4. Keyword EXPORT is specified for P2. A prototype is specified for P2, so a compile error is not issued for P2.
  5. Keywords EXPORT and REQPROTO(*NO) are specified for P3.

    No prototype is specified for P3, but a compile error is not issued for P3 because REQPROTO(*NO) indicates that a prototype is not required.

  6. Keyword EXPORT is specified for P4 but keyword REQPROTO(*NO) is not specified.
  7. No prototype is specified for P4, so a compile error is issued for P4.

    The error message states the following: "No prototype is specified for an external procedure or program, and REQPREXP(*REQUIRE) is specified."


CTL-OPT REQPREXP(*REQUIRE);       //  1 
DCL-PR P1 END-PR;                 //  2 
DCL-PR P2 END-PR;                 //  2 

DCL-PROC P1 EXPORT REQPROTO(*NO); //  3 
END-PROC;

DCL-PROC P2 EXPORT;               //  4 
END-PROC;

DCL-PROC P3 EXPORT REQPROTO(*NO;  //  5 
END-PROC;

DCL-PROC P4 EXPORT;               //  6 
===> Error:                       //  7 
END-PROC;