Progress
Programming
Handbook


Defining a Set of Records to Fetch

To fetch records, you must first define the set of records that you want Progress to fetch. For example, the following statement defines the set of all customer records:

FOR EACH Customer: 

Progress allows you to define a set of records in a variety of ways. You define the set of records in a Record phrase. For more information on the syntax of Record phrases, see the Progress Language Reference . You can specify a Record phrase for the following Progress statements:

The examples given below illustrate some of the flexibility that you have when defining a set of records. The Record phrases are highlighted. You can build complex Record phrases using the AND and OR operands.

This example defines a set of one record (customer 11):

FIND Customer WHERE cust-num = 11. 

This example uses the word-indexed field Comments to define a set of records (all customer records containing the word “ship”):

FOR EACH Customer WHERE Comments CONTAINS "ship": 

This example creates the subset of all Order records with the Customer number = 11:

OPEN QUERY ordqry FOR EACH Order WHERE Cust-Order = 11. 

This example defines a set of customer records (those between 25 and 50) to be preselected:

REPEAT PRESELECT EACH Customer WHERE cust-num > 25 AND cust-num < 50: 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095