Step 2 Recompile the File and Test Department Rules

Visual LANSA

Step 2. Recompile the File and Test Department Rules

REP007 - File Validation Rules/Triggers

Because you have changed a rule (field or file level) in the repository, the OAM of the file must be recompiled.

1.  Before submitting the compile, check that you do not have any functions or forms active which are accessing the Department file, otherwise you may encounter locking problems.

2.  Compile the file iiiDepartments. Use the Verify menu and select the Compile option. Check that your compile options are set as follows:

     Note that you have data in the files and you have not changed the table definition (that is, added or removed fields). Also, you have not added or removed any indexes/views. Therefore you only need to rebuild the OAM.

3.  Check that the file compile completed successfully.

4.  Execute your Department Maintenance form iiiMaintDepartment.

a.  Try to add a blank department code. Notice the validation messages which appear and their order (use the up and down buttons in the status bar). You will see both the field and file level messages.

b.  Try to add a department code of 111. Notice the error messages.

c.  Exit the application.

5.  Execute your Employee Maintenance form iiiMaintEmployee.

a.  Try to add a new employee with a department code of 111. Notice there is no error because the rule was only added to the iiiDeptCode field in file iiiDepartments.

     The rule does not apply to the file iiiEmployees.

b.  Close the form.

6.  Close the file.