Previous Topic: Specify Selection Conditions for a READ EACH ActionNext Topic: Specify Relationship Conditions for READ EACH


Specify Attribute Conditions for a READ EACH Action

The same attribute conditions apply to the READ and the READ EACH actions. For information on the syntax and types of expressions used to specify attribute conditions for a READ EACH action, see the Specify Attribute Conditions for a READ Action.

The following example shows how READ EACH attribute conditions are used in Action Diagrams. The first example discovers whether the business knows about the CUSTOMER who is attempting to place an ORDER (in the process Take Order):

READ EACH customer
WHERE DESIRED customer name IS EQUAL TO requesting
customer name

The next example reads all customers whose name begins with Q:

READ EACH customer
WHERE SUBSTR(DESIRED customer name, 1,1) IS EQUAL TO
"Q"

Note: If the qualifying attributes of a READ EACH action must be changed before subsequent iterations of the READ EACH are executed, an escape could be placed within the READ EACH. The qualifying attributes could then be set to new values, and those set statements along with the READ EACH could be placed within a REPEAT loop.