4 3 1 Logical View Concepts

Visual LANSA

4.3.1 Logical View Concepts

Logical files or views are used to create alternate ways of organizing the data in your files. Logical files do not store data. For example, your customer physical file may be keyed or indexed by customer number but you need to be able to look up data by customer name. You could create a logical file which would put the customer file data in order by name. If you delete this logical file, the data is not deleted. The data is stored in the physical file or table.

Logical file definitions are created as part of the file definition process; i.e. a physical file must be defined before a logical file can be created over it.  You create logical files by working with file definitions; however, with logical files you must work within a selected physical file definition. A single physical file may have many logical views of the data it contains.

Logical file definitions in LANSA include a file name and key fields. (Access path maintenance options are also specified for IBM i databases).  In addition, logical files may have select and omit criteria specified which are used to control which records will be included in the logical view. 

It is important to understand the basic concepts of databases and file definitions before beginning to work with LANSA.  For more information, refer to the IBM Programming Database Guide or other appropriate database guides.

Remember, logical files are part of a LANSA file definition and are not separate objects in the repository. To create or edit a logical file, you must select and open the physical file that it is based upon.

Also See

4.3.4 Examples of Logical Files

4.3.3 Logical File Considerations

Ý 4.3 Logical View Development