Tutorial Chapter 11: Master/Detail / The Orders Program orders.4gl |
This function calls the function order_fetch to retrieve the rows in the database; the parameter p_fetch_flag indicates the direction for the cursor movement. If there are no more records to be retrieved, a message is displayed to the user.
01 FUNCTION order_fetch_rel(p_fetch_flag) 02 DEFINE p_fetch_flag SMALLINT 03 04 MESSAGE " " 05 IF (NOT order_fetch(p_fetch_flag)) THEN 06 IF (p_fetch_flag = 1) THEN 07 MESSAGE msg05 08 ELSE 09 MESSAGE msg06 10 END IF 11 END IF 12 13 END FUNCTION