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