4 6 1 Access Route Concepts

Visual LANSA

4.6.1 Access Route Concepts

LANSA uses access routes to describe relationships between files in a database. They provide information about the database map or schema. Access routes are simply text descriptions of file relationships in the database. They have no physical impact on the database.

An access route defines to LANSA a route from one file to another file. An access route answers the question: Given that I have a record from file A..... how do I access the associated record(s) in file B?

File A is always the file definition that is currently being worked upon. File B can be any other physical or logical file defined using the LANSA system.

File A can have many access routes. They could all be from file A to file B, or some could be to any other file that is related to file A. Access routes are defined in both directions, i.e. from file A to B and from file B to A.

One access route can only define the route from file A to file B. However, file A can have many access routes associated with it. Thus file A can have additional access routes to file C and to file D, etc., etc.

In addition, access routes can be followed in a chain. Thus if there is an access route from file A to file B, and an access route from file B to file C, then it is possible to start with a record from file A and locate the associated record(s) in file C.

Access routes are very important to the automatic process definition components of LANSA because:

  • Users do not need to understand the data base structure. You only need to nominate a "base" or "starting" file and LANSA can then follow the access route chains to present the other accessible files as simple alternatives.
  • The relationship between records in the 2 files in any access route is predefined as "1 : 1" or "1 : many". This enables the required screen formats to be automatically designed for the type of information expected.

Access routes are used in the following ways in LANSA:

  • By the LANSA application templates to show related files
  • By predetermined join fields to define cardinality and the links between files
  • By LANSA Client to show linked or joined files.

Warning

  • Access routes only point to the active version of a file. This is the most recently compiled version, and not necessarily the latest version. Similarly, a new file must be compiled at least once for an access route to point to it.

Tips & Techniques

  • Do not confuse access routes with IBM i database access paths. Access routes have no relationship to access paths.

Also See

4.6.2 Access Route Examples

4.6.4 Access Route Considerations

Ý 4.6 Access Route Development