SQL>
SQL> DECLARE
2 v_statpipe1 integer;
3 v_statpipe2 integer;
4 v_pubchar VARCHAR2(100) := 'This is a text string';
5 v_pubdate DATE := SYSDATE;
6 v_pubnum NUMBER := 109;
7 BEGIN
8 v_statpipe1 := DBMS_PIPE.CREATE_PIPE('myprivatepipe');
9 IF (v_statpipe1 = 0) THEN
10 DBMS_PIPE.PACK_MESSAGE('privateline1');
11 DBMS_PIPE.PACK_MESSAGE('privateline2');
12 v_statpipe1 := DBMS_PIPE.SEND_MESSAGE('myprivatepipe');
13 END IF;
14
15 DBMS_PIPE.PACK_MESSAGE(v_pubchar);
16 DBMS_PIPE.PACK_MESSAGE(v_pubdate);
17 DBMS_PIPE.PACK_MESSAGE(v_pubnum);
18 v_statpipe2 := DBMS_PIPE.SEND_MESSAGE('mypublicpipe');
19 DBMS_OUTPUT.PUT_LINE('The Status of your Private Pipe is: ' || v_statpipe1 );
20 DBMS_OUTPUT.PUT_LINE('The Status of your Public Pipe is: ' || v_statpipe2 );
21 END;
22 /
The Status of your Private Pipe is: 0
The Status of your Public Pipe is: 0
PL/SQL procedure successfully completed.
SQL>
SQL> --
|