4 9 3 What to Recompile

Visual LANSA

4.9.3 What to Recompile

The following example will help you to understand what to recompile when a change occurs in your application database.

Consider the following:

Each file has its own OAM.

The DEPTAB file has an OAM to allow functions to update records from DEPTAB file.

The PSLMST file has an OAM to allow functions to update records from PSLMST file.

The PSLMST OAM may have rules which read from the DEPTAB file.

When you change the physical file definition of the DEPTAB File (i.e. add fields, remove fields, or change their attributes), the DEPTAB file, its logical files and its OAM must be created. The question is, "Does the PSLMST OAM have to be created?"

The PSLMST file has a validation check which involves the DEPTAB file.  The Department Code in the Employee file must exist in a DEPTAB file when creating a new Employee. The PSLMST file's OAM must open the DEPTAB file to perform a file look up validation check because the Department Code exists in the DEPTAB file. The check is not done by calling the DEPTAB file's OAM.  Therefore, the PSLMST file's OAM must also be recompiled or else an IBM i level check error will result. (For more information on level checks, see the IBM Database Guidelines.)

As a rule:

If you change a physical file definition, you must make it operational.  You must also recompile any OAM for files which access the changed physical file.

Reviewing your data model relationships will help you find any affected files.  You must also be aware of any validation rules you have added involving file look ups. 

If you have used batch control, you will also be required to recompile OAMs.

Also See

4.9.4 When To Recompile

Ý 4.9 Compiling Files