When coding ABL applications for the DataServer, FOR FIRST statements can be used often be replaced with another ABL statement to greatly improve performance. Using FOR only in place of FOR FIRST can improve performance when retrieving a single record. For example, if your application uses the following FOR FIRST code:

FOR FIRST customer WHERE cust-num <=10:
DISP NAME.
END.

This code returns a list of all customer names where the customer name is less than or equal to 10. It can be replaced with the following code for retrieving a single record with significant performance gains:

FOR customer WHERE cust-num <=10:
DISP NAME.
END.