IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Manipulating messages in the BLOB domain

How to deal with messages that belong to the BLOB domain, and that are parsed by the BLOB parser.

You cannot manipulate the contents of a BLOB message, because it has no predefined structure. However, you can refer to its contents using its known position within the bit stream, and process the message with a minimum of knowledge about its contents.

The BLOB message body parser does not create a tree structure in the same way that other message body parsers do. It has a root element BLOB, that has a child element, also called BLOB, that contains the data.

You can refer to message content using substrings if you know the location of a particular piece of information within the BLOB data. For example, the following expression identifies the tenth byte of the message body:

InputBody.BLOB.BLOB[10]

The following expression references 10 bytes of the message data starting at offset 10:

SUBSTRING(InputBody.BLOB.BLOB from 10 for 10)

You can use the Mapping node to map to and from a predefined BLOB message, and to map to and from items of BLOB data.

Simple example to write a string in the output message

The following simple example allows you to write some character data in your ESQL (for example, if you have read some character fields from a database) out as a BLOB:
CALL CopyMessageHeaders();
	-- CALL CopyEntireMessage();
	DECLARE mystring CHARACTER;
	SET mystring='hello';
	SET OutputRoot.BLOB.BLOB=CAST (mystring AS BLOB CCSID 1208);

ac11640_.htm | Last updated Friday, 21 July 2017