Author |
Message
|
vsr |
Posted: Wed Nov 21, 2007 12:07 pm Post subject: Create MRM message from BLOB input |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
Hi everyone,
I am trying to develop a simple flow which gets BLOB message and parse as MRM. Here is the situation:
1. I get BLOB message in the MQInput node
2. I need to parse as a MRM to read some data in the message.
I tried the following code:
Code: |
SET Environment.Variables.response = InputRoot.BLOB.BLOB;
CREATE LASTCHILD OF OutputRoot DOMAIN('MRM') PARSE(Environment.Variables.Response
SET 'aaaaa'
TYPE 'bbbbb'
FORMAT 'cccc'
ENCODING InputRoot.MQMD.Encoding
CCSID InputRoot.MQMD.CodedCharSetId); |
But i am getting an error at the Create and Parse statement saying "BITSTREAM CREATE CHARACTER,BIT,BLOB NULL" (extracted from trace node).
Is there anything I have missed out? |
|
Back to top |
|
 |
vsr |
Posted: Wed Nov 21, 2007 12:11 pm Post subject: |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
I forgot to mention that I am using Broker 6.0.0.3 with Toolkit 6.0.2 |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 21, 2007 12:32 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
What does the error tree say? Is your line break char correct? I had trouble because the BLOB was supposed to end with a new line char. But Unix and Win have a different new line... win has 0A0D where Unix has only one byte...
So the executing on Unix with a file ftp'd as binary from windows got me into trouble....(parsing error) _________________ MQ & Broker admin |
|
Back to top |
|
 |
vsr |
Posted: Wed Nov 21, 2007 1:19 pm Post subject: |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
The exception list says "BITSTREAM CREATE CHARACTER,BIT,BLOB NULL" (this is collection of 'text' message in the exception list) It doesn't have much information.
Actually the request (BLOB message) is coming from mainframe (with encoding 785, ccsid 500). The queue is defined on a unix box (with encoding 546, ccsid 819). So, InputRoot.MQMD.Encoding will be 546.
What encoding and ccsid should i use in the CREATE...PARSE statement ? mainframe or unix ?
Do you think this is causing the problem ? anyhow i will play with it and update on that. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 21, 2007 1:37 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Depends on your input node.
I would not specify on the Inputnode to do a get with convert....
Use the CCSID and Encoding on the InputRoot.Properties
This should be right all the time.
Also make sure the message conforms to the message set (imported copy book). I have seen too many times fields initialized to low value (bin/hex zeroes) where a null value of spaces was expected....
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Wed Nov 21, 2007 2:13 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
This might be a parsing error. Or it might be something to do with the CCSID and encoding. The best way to diagnose it is:
- Create a simple message flow MQInput -> MQOutput,
- Set Parse Timing to 'Immediate'
- Set domain to 'MRM' and set message set/type/format appropriately
Test your message set using this flow. When you know that the message set is correct, use it in the CREATE...PARSE statement. |
|
Back to top |
|
 |
|