Function order_fetch_rel
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.
Function
            
order_fetch_rel: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 FUNCTIONNote: 
- Line 
05calls the functionorder_fetch, passing the variablep_fletch_flagto indicate the direction of the cursor. - Line 
07displays a message to indicate that the cursor is at the bottom of the result set. - Line 
09displays a message to indicate that the cursor is at the top of the result set.