Access Route Examples
These examples apply to defining an access route within a file definition.
Four related file definitions are used in these examples. These are defined as follows:
|
To allow complete traversal of this database by users the following access routes would be defined:
|
From this table it is easy to see how LANSA can follow the access route chains. For example, say the user nominated PROMST (product master) as a "starting" or "base" file. This would occur:
- Using access route PROMRT1 a route to ORDLIN (order lines) is available (via logical file ORDLINV1) which will access all invoice lines that use the product.
- From ORDLIN the associated order header (ORDHDR) details can be picked up using access route ORDLRT1. The access route ORDLRT2 back to PROMST would be ignored as it forms a "loop".
- From ORDHDR the associated customer details (CUSMST) can be found via access route ORDHRT2. Again ORDHRT1 would be ignored as it forms a "loop".