Summary

Visual LANSA

Summary

REP005 - Creating Files

Important Observations

  • Notice that the field level validation rules you created in exercise REP003 - Validation Rules are enforced when you maintain the files.  Field level validations are enforced in every file in which the field is used. However, remember most validation rules should be defined at file level.
  • Key sequence is used to define the order of the keys in the file. The physical sequence of fields and the key sequence are independent.
  • Access to files is handled by the Object Access Modules (OAM). Every file used by LANSA has an OAM which contains the repository features of the file and its fields. The OAM is executed whenever the file is accessed by a program.
  • When you make a change to a field used in a file or to the file definition itself, you need to recompile the file. You do not need to recompile your programs unless the change affects the visual display.

Tips and Techniques

  • Use the multi-add fields feature as a faster way to add fields to a file. You can include fields that do not exist in the repository and these fields will be created when you exit the multi-add window.
  • Database attributes become more important if you are deploying databases to other platforms. Refer the online help for each database attribute before using it.

What I Should Know

  • How to define a file in the LANSA repository.
  • How to add fields to a file definition.
  • How to specify file keys.
  • How to compile a file to make it operational.
  • Some of the attributes that can be specified for database files.