-- sender2.sql

SET SERVEROUTPUT ON
BEGIN
  DBMS_PIPE.PACK_MESSAGE('sender 2 : msg 1 : item 1');
  IF DBMS_PIPE.SEND_MESSAGE('LabPipe') = 0 THEN
    DBMS_OUTPUT.PUT_LINE('Message sent successfully');
  ELSE
    DBMS_OUTPUT.PUT_LINE('Message failed');
  END IF;

  DBMS_PIPE.PACK_MESSAGE('sender 2 : msg 2 : item 1');
  IF DBMS_PIPE.SEND_MESSAGE('LabPipe') = 0 THEN
    DBMS_OUTPUT.PUT_LINE('Message sent successfully');
  ELSE
    DBMS_OUTPUT.PUT_LINE('Message failed');
  END IF;

  DBMS_PIPE.PACK_MESSAGE('sender 2 : msg 3 : item 1');
  IF DBMS_PIPE.SEND_MESSAGE('LabPipe') = 0 THEN
    DBMS_OUTPUT.PUT_LINE('Message sent successfully');
  ELSE
    DBMS_OUTPUT.PUT_LINE('Message failed');
  END IF;
END;
/
