[ |../../index.htm#lansa/ugub_30050.htm]
You are here:

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:

File:

 

ORDHDR

ORDLIN

CUSMST

PROMST

Desc:

 

Order header

Order lines

Customer master

Product master

Fields:

 

ORDNUM CUSTNO DATE

ORDNUM ORDLIN QUANTY PRODNO

CUSTNO NAME ADDR1 ADDR2 ADDR3

PRODNO DESC PRICE TAXRTE

Primary Key

1

ORDNUM

ORDNUM

CUSTNO

PRODNO

 

2

 

ORDLIN

 

 

Logical Views:

 

ORDHDRV1O

RDLINV1

 

 

by key

1

CUSTNO

PRODNO

 

 

 |
To allow complete traversal of this database by users the following access routes would be defined:

File Definition Name

Access Route Name

File to be Accessed via this Route

Max records expected

Action to be taken if no records found

Key fields/values used for access

ORDHDR

ORDHRT1

ORDLIN

99

IGNORE

ORDNUM

 

ORDHRT2

CUSMST

1

ABORT

CUSTNO

ORDLIN

ORDLRT1

ORDHDR

1

ABORT

ORDNUM

 

ORDLRT2

PROMST

1

ABORT

PRODNO

CUSMST

CUSMRT1

ORDHDRV1

9999

IGNORE

CUSTNO

PROMST

PROMRT1

ORDLINV1

9999

IGNORE

PRODNO

 |
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:

[ |../../index.htm#lansa/ugub_30050.htm]