a prototype is the procedure interface definition
it describes the procedure so that it can be called from other procedures / programs
A procedure prototype (definition type PR) has at least two general purposes, depending whether it’s in the called module or the calling module. Both purposes involve influencing the compiler.
In the module that contains the procedure, the prototype is compared against the procedure interface (definition type “PI”). The number, order and data types of the parameters, as well as any return value, are expected to match.
This is useful because the prototype is also needed in any module that uses the CALLP (Call with Prototype) op-code. By using /COPY for the prototype, you can ensure that the calling and called modules have the same prototype.
In the calling module with CALLP, the prototype is used by the compiler to help convert values from their variable data types to whatever types are needed by the called procedure. That’s why you don’t need to be nearly so concerned about using literals for parms or passing in integer values when the procedure expects packed. The possibility of mismatched parm definitions is drastically reduced.
In short, the prototype helps you write fewer C-specs that are less likely to have errors.