DB2 Version 9.7 for Linux, UNIX, and Windows

PACK_MESSAGE_RAW procedure - Put a data item of type RAW in the local message buffer

The PACK_MESSAGE_RAW procedure puts a data item of type RAW in the session's local message buffer.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-DBMS_PIPE.PACK_MESSAGE_RAW--(--item--)----------------------><

Procedure parameters

item
An input argument of type BLOB(4096) that specifies an expression. The value returned by this expression is added to the session's local message buffer.

Authorization

EXECUTE privilege on the DBMS_PIPE module.

Example

Use the PACK_MESSAGE_RAW procedure to put a data item of type RAW in the local message buffer.

SET SERVEROUTPUT ON@ 

CREATE PROCEDURE proc1()
BEGIN
  DECLARE v_raw           BLOB(100);
  DECLARE v_raw2	  BLOB(100);
  DECLARE v_status        INTEGER;
  SET v_raw = BLOB('21222324'); 
  SET v_raw2 = BLOB('30000392'); 
  CALL DBMS_PIPE.PACK_MESSAGE_RAW(v_raw);
  CALL DBMS_PIPE.PACK_MESSAGE_RAW(v_raw2);
  SET v_status = DBMS_PIPE.SEND_MESSAGE('datatypes');
  CALL DBMS_OUTPUT.PUT_LINE('SEND_MESSAGE status: ' || v_status);
END@

CALL proc1@

This example results in the following output:

SEND_MESSAGE status: 0

Usage notes

The PACK_MESSAGE function or PACK_MESSAGE_RAW procedure must be called at least once before issuing a SEND_MESSAGE call.