5.4 Review the File Definitions

Once you have loaded an existing file's definitions or created a new file, you may wish to add:

5.4.1 Field Validation Rules and Triggers

5.4.2 Help Text

5.4.3 Access Routes to other files

5.4.4 Predetermined Join Fields

Before your selected option screen is displayed, you will be asked to nominate the file you wish to work with using the screens described in 5.4.5 Nominate the File to work with.

Use as many file level validation checks as possible, as by doing so:

  • Most client/server applications can be written without any on-line validation.
  • The rules can be changed without modifying or re-compiling the application programs which use the file.
  • The rules are standardized and can be tested by the application designer before any application code is written.
  • The rules protect the database, even from a rogue application program.

    You can find complete details of the Repository file options in Files in the LANSA for i User Guide.

    If possible, file definition maintenance should be assigned as a task to one person within a project team or even to one person within an organization, to ensure that:

  • All files (physical and logical) have accurate and concise descriptions.
  • The use of too many logical views is avoided. The maintenance of logical file access paths (indexes) is probably the largest resource user on any IBM i.
  • Error messages are standardized and consistent.
  • The steps to review the file definition are:

    1.  From the Housekeeping Menu select the File Control Menu line.

    2.  From the File Control Menu, select the Review or change a file definition line.

    3.  Nominate the file you wish to work with via the Select File to Work with screens.

    4.  The File Definition menu is displayed.

    5.  Select the required option from the menu and press Enter.