WHERE-PAR

The WHERE-PAR keyword modifies a FORALL or WITH statement to override one or more parameters when retrieving records using an entry-subentry relationship. All parameters that are not explicitly overridden by PAR keywords are filled as defined in the DID.

FORALL <Entry_reference_name> IN <Entry_reference_name>.<DID-defined_sub_entry> WHERE
	PAR ( <i> ) = <expr>
	…
DO
	…
OD 

An example is provided here.

FORALL Customer IN XXX.Customers
DO
	FORALL Partner IN Customer.Children WHERE
		PAR ( 2 ) = “Partner”	(* Type of relationship *)
	DO
		…
	OD
OD

This example loops over all Customers, retrieving Children records for each Customer.

The first parameter for the Children entry is derived from the Customer record as defined in the DID. The second parameter is overridden by the Template, modifying the request to retrieve records with the Partner attribute instead.