ECHECK - Existence Check for Object Calling Statements

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

Possible settings ON The compiler checks for the existence of an object that is specified in an object calling statement, such as FETCH [RETURN/REPEAT], RUN [REPEAT], CALLNAT, PERFORM, INPUT USING MAP, PROCESS PAGE USING, function call and helproutine call.

The existence check is based on a search for the cataloged object or for the source of the object when it is invoked by a RUN [REPEAT] statement.

It requires that the name of the object to be called/run is defined as an alphanumeric constant (not as an alphanumeric variable).

Otherwise, ECHECK=ON will have no effect.

Problems in Using the CATALL Command with ECHECK=ON

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

If a CATALL process is invoked, the order in which the 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:

GDAs, LDAs, PDAs, functions, subprograms, external subroutines, help routines, maps, adapters, programs, classes.

Within objects of the same type, the alphabetical order of the name determines the sequence in which they are cataloged.

As mentioned above, the success of the object calling statement is 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 ECHECK result may be wrong if the called object was not cataloged beforehand. In this case, the object image of the called object has not yet been produced by the CATALL command.

Solution:

  • Set compiler option ECHECK 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 ECHECK=ON.

  • On the complete library, perform a general compile with CATALL, selecting function CHECK.

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