DEFINE vWhere AS CHARACTER NO-UNDO.
DEFINE QUERY qCustomer FOR Customer SCROLLING.
vWhere = "FOR EACH Customer WHERE ...".
QUERY qCustomer:QUERY-PREPARE(vWhere).
QUERY qCustomer:QUERY-OPEN().
REPEAT:
GET NEXT qCustomer.
IF NOT AVAILABLE Customer THEN LEAVE.
DISPLAY Customer.NAME.
END.
QUERY qCustomer:QUERY-CLOSE().