I'm having trouble trying to add MQMD header in compute node. Tried something like that:
SET OutputRoot.Properties = InputRoot.Properties;
CREATE LASTCHILD OF OutputRoot DOMAIN('MQMD') NAME 'MQMD';
SET OutputRoot.MQMD.Format = MQFMT_NONE;
SET OutputRoot.MQMD.CodedCharSetId = 1208;
SET OutputRoot.MQMD.Encoding = 546;
But it always ends up with this exception:
Text:CHARACTER:Caught exception and rethrowing
Insert
Type:INTEGER:14
Text:CHARACTER:test.MyAdp.AddHeader
RecoverableException
File:CHARACTER:F:\build\slot1\S900_P\src\CommonServices\ImbValue.cpp
Line:INTEGER:989
Function:CHARACTER:ImbValue::stateError
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2329
Text:CHARACTER:Value not valid
For sure, without adding MQMD header everything works perfectly well. I tried to use other formats as MQFMT_STRING, MQFMT_RF_HEADER_2 (with MQRFH2 header added next) but with the same result.
Can anyone give me any clue? Is it possible to get some more meaningful diagnostics from broker somehow?
UPD Here is trace out before entering Compute node which tries to add MQMD header. The trace node after Compute is never reached.
( ['GENERICROOT' : 0xac05710]
(0x01000000:Name):Properties = ( ['GENERICPROPERTYPARSER' : 0xaf5ccc0]
(0x03000000:NameValue):MessageSet = '' (CHARACTER)
(0x03000000:NameValue):MessageType = '' (CHARACTER)
(0x03000000:NameValue):MessageFormat = '' (CHARACTER)
(0x03000000:NameValue):Encoding = 546 (INTEGER)
(0x03000000:NameValue):CodedCharSetId = 0 (INTEGER)
(0x03000000:NameValue):Transactional = TRUE (BOOLEAN)
(0x03000000:NameValue):Persistence = FALSE (BOOLEAN)
(0x03000000:NameValue):CreationTime = NULL
(0x03000000:NameValue):ExpirationTime = -1 (INTEGER)
(0x03000000:NameValue):Priority = 0 (INTEGER)
(0x03000000:NameValue):ReplyIdentifier = X'000000000000000000000000000000000000000000000000' (BLOB)
(0x03000000:NameValue):ReplyProtocol = 'UNKNOWN' (CHARACTER)
(0x03000000:NameValue):Topic = NULL
(0x03000000:NameValue):ContentType = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceType = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceToken = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedType = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedToken = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
)
(0x01000000:Name):BLOB = ( ['none' : 0xb30d460]
(0x03000000:NameValue):BLOB = X'314........d0a' (BLOB)
)
)
UPD2 Here is fragment of user trace, message appears in try-catch node right after returning from compute node that creates MQMD.
2015-09-14 13:20:06.936871 1200 UserTrace BIP2539I: Node '': Evaluating expression ''InputRoot.BLOB.BLOB || CAST(header AS BLOB CCSID 1208)'' at ('test.MyAdp_AddHeader.Main', '31.51'). This resolved to ''X'314....3d0d'''.
2015-09-14 13:20:06.937023 1200 UserTrace BIP2566I: Node 'test.MyAdp.AddHeader': Assigning value ''X'314...6d0'... (data of len 3915 truncated)'' to field / variable ''OutputRoot.BLOB.BLOB''.
2015-09-14 13:20:06.937043 1200 UserTrace BIP2537I: Node 'test.MyAdp.AddHeader': Executing statement ''RETURN TRUE;'' at ('test.MyAdp_AddHeader.Main', '33.4').
2015-09-14 13:20:06.937718 1200 UserTrace BIP4081I: Message propagated to catch terminal from try-catch node 'test.MyAdp.ErrorHandler.Timer.Try Catch'.
The try-catch node 'test.MyAdp.ErrorHandler.Timer.Try Catch' has caught an exception which occurred in a node connected to its try terminal. The message has been augmented with an exception list and is propagating it to any nodes connected to its catch terminal for further processing. See the following messages for details of the exception list.
No user action required.
There is not enough detail given to tell what is happening. What version of MB/IIB are you using?
You might be hitting the problem described here.
With that in mind, try changing your ESQL to:
SET OutputRoot.Properties.CodedCharSetId = 1208 ;
SET OutputRoot.Properties.Encoding = 546 ;
SET OutputRoot.MQMD.Format = MQMFT_NONE ;
SET OutputRoot.MQMD.CodedCharSetId = 1208 ;
SET OutputRoot.MQMD.Encoding = 546 ;
...