SQL>
SQL> CREATE OR REPLACE PROCEDURE forward(from_in IN VARCHAR2,to_in IN VARCHAR2,timeout_secs_IN IN INTEGER := 10) IS
2 stat INTEGER;
3 BEGIN
4 DBMS_PIPE.RESET_BUFFER;
5 DBMS_PIPE.PACK_MESSAGE('message');
6
7 stat := DBMS_PIPE.RECEIVE_MESSAGE (from_in, timeout=>timeout_secs_IN);
8 IF stat = 0
9 THEN
10 stat := DBMS_PIPE.SEND_MESSAGE (to_in, timeout=>timeout_secs_IN);
11 END IF;
12 END forward;
13 /
|