PCHECK - Parameter Checking for Object Calling Statements

This Natural profile parameter is used to control Natural's compiler.

Possible settings ON The compiler checks the number, format, length and array index bounds of the parameters that are specified in an object calling statement, such as CALLNAT, PERFORM, INPUT USING MAP, PROCESS PAGE USING, helproutine calls. Also, the OPTIONAL feature of the DEFINE DATA PARAMETER statement is considered in the parameter check.

The parameter check is based on a comparison of the parameters of the calling statement with the DEFINE DATA PARAMETER definitions for the object to be called.

It requires that

  • the name of the object to be called is defined as an alphanumeric constant (not as an alphanumeric variable),

  • the object to be called is available as a cataloged object.

Otherwise, PCHECK=ON will have no effect.

Problems in Using the CATALL Command with PCHECK=ON

When a CATALL command is used in conjunction with PCHECK=ON, you should consider the following:

If a CATALL process is invoked, the order in which the Natural objects are compiled depends primarily on the type of the object and secondarily on the alphabetical name of the object. The object type sequence used is: DDMs, GDAs, LDAs, PDAs, classes, maps, external subroutines, subprograms, functions, adapters, helproutines, programs. Within objects of the same type, the alphabetical order of the name determines the sequence in which they are cataloged.

As mentioned above, the parameters of the object calling statement are checked against the compiled form of the called object. If the calling object (the one which is being compiled and includes the object calling statement) is cataloged before the invoked object, the PCHECK result may be wrong if the parameters in the object calling statement and in the called object were changed. In this case, the new object image of the called object has not yet been produced by the CATALL command.

This causes the new parameter layout in the object calling statement to be compared with the old parameter layout of the DEFINE DATA PARAMETER statement of the called subprogram.


  • Set compiler option PCHECK to OFF.

  • Perform a general compile with CATALL on the complete library, or if just one or a few objects were changed, perform a separate compile on these objects.

  • Set compiler option PCHECK=ON.

  • On the complete library, perform a general compile with the function CHECK of system command CATALL enabled.

OFF No parameter check is performed.
Default setting   OFF  
Dynamic specification   yes  
Specification within session yes  
Applicable statements OPTIONS  
Applicable command PCHECK Option of system command COMPOPT