PATH

The PATH keyword modifies a FORALL or WITH statement to retrieve records directly from the database. The Template must explicitly provide all keys for the record using the PAR keyword.


FORALL <Entry_reference_name> PATH <Xxx>.<Entry_sequence> WHERE
	PAR ( 1 ) = <expr>
	PAR ( 2 ) = <expr>
	…
DO
	…
OD 

Xxx is the three letter code of the DID.

Entry_sequence identifies a path of entries through the DID, separated by dots. The first entry must be a main entry, the last entry specifies the entry retrieved. Each pair of entries must be defined in the DID as an entry-subentry relation.

PAR ( i ) = <expr> defines the expression that provides the value for the ith parameter of the entry. All formal parameters of the entry must be defined using PAR keywords. The type of each expression (TEXT or NUMBER) must match the type of the formal parameter.

An example is provided here.

FORALL Child PATH XXX.Customers.Children WHERE
	PAR ( 1 ) = 34162548	(* Customer number *)
	PAR ( 2 ) = “Child”	(* Type of relationship *)
DO
	…
OD

This example retrieves all records for customer 34162548 with the Child attribute. The intermediary .Customers. part in the path only serves to identify the Children entry. No data is retrieved from the Customers entry.