System Packages Oracle PLSQL

SQL>
SQL>   DECLARE
  2          v_statpipe1 integer;
  3          v_statpipe2 integer;
  4          v_holdtype INTEGER;
  5          v_holdchar VARCHAR2(100);
  6          v_holddate DATE;
  7          v_holdnum NUMBER;
  8     BEGIN
  9         v_statpipe1 := DBMS_PIPE.RECEIVE_MESSAGE('myprivatepipe',15);
 10         DBMS_PIPE.UNPACK_MESSAGE(v_holdchar);
 11         DBMS_OUTPUT.PUT_LINE(v_holdchar);
 12         DBMS_PIPE.UNPACK_MESSAGE(v_holdchar);
 13         DBMS_OUTPUT.PUT_LINE(v_holdchar);
 14
 15       v_statpipe2 := DBMS_PIPE.RECEIVE_MESSAGE('mypublicpipe',10);
 16         LOOP
 17              v_holdtype := DBMS_PIPE.NEXT_ITEM_TYPE;
 18              IF v_holdtype = 0 THEN EXIT;
 19              ELSIF v_holdtype = 6 THEN
 20                   DBMS_PIPE.UNPACK_MESSAGE(v_holdnum);
 21              ELSIF v_holdtype = 9 THEN
 22                   DBMS_PIPE.UNPACK_MESSAGE(v_holdchar);
 23              ELSIF v_holdtype = 12 THEN
 24                   DBMS_PIPE.UNPACK_MESSAGE(v_holddate);
 25              END IF;
 26         END LOOP;
 27         DBMS_OUTPUT.PUT_LINE(v_holdchar || ' ' || v_holddate || ' '
 28              || v_holdnum);
 29    END;
 30  /
privateline1
privateline2
This is a text string 16-JUN-2008 18:14:00 109
PL/SQL procedure successfully completed.
SQL>
SQL> --