|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Where to specify the parser while creating the message set |
« View previous topic :: View next topic » |
Author |
Message
|
Aarkay |
Posted: Wed Apr 16, 2003 7:53 am Post subject: Where to specify the parser while creating the message set |
|
|
Newbie
Joined: 15 Apr 2003 Posts: 6
|
I want to append IIH Header to the incoming message, i have a cobol copy book of that IIH header , where i need to specify parser as MQIIH. so that i can use as OutputRoot.MQIIH. in the ESQL code...
While creating the message set in the runtime tab i see only few parsers like MRM,XML..... I dont see MQIIH... Does anybody know how to get that parser into picture... |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 16, 2003 8:34 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay, to put together all the separate threads you've created that are asking the same question.
This is what I understand you are trying to do:
1) Parse an input message based on a COBOL copybook
2) ADD an MQIIH header to it before you send it to your mainframe application
To accomplish that,
1) Define your imported MRM message set to your input node
2) add code to a compute node that looks like this
Code: |
Set OutputRoot.MQIIH.Format = MQFMT_STRING;
Set OutputRoot.MQIIH.CodedCharSetId = InputRoot.MQMD.CodedCharSetId;
Set OutputRoot.MQIIH.MFSMapName = YourApplicationSpecificMFSMapName; |
and etc. to fully populate the new MQII header that you are trying to build, obviously replacing the values I put in with the appropriate values for your application. |
|
Back to top |
|
 |
Aarkay |
Posted: Wed Apr 16, 2003 9:51 am Post subject: Logical structure |
|
|
Newbie
Joined: 15 Apr 2003 Posts: 6
|
Jeff, don't i need to have logical tree structure of the IIH in the output. I can assign values but the problem is , while creation of the IIH Logical structure how to specify the parser, i dont see no option MQIIH nowhere. thatz where i was clutched..... here i have the values, but how to create the logical structure with MQIIH parser...
SET OutputRoot.MQIIH.StrucId ='IIH ';
SET OutputRoot.MQIIH.Version =1;
SET OutputRoot.MQIIH.StrucLength = MQIIH_LENGTH_1;
SET OutputRoot.MQIIH.Encoding = 0;
SET OutputRoot.MQIIH.CodedCharSetId = 0;
SET OutputRoot.MQIIH.Format ='MQIMSVS ';
SET OutputRoot.MQIIH.Flags =0;
SET OutputRoot.MQIIH.LTermOverride =' ';
SET OutputRoot.MQIIH.MFSMapName =' ';
SET OutputRoot.MQIIH.ReplyToFormat ='MQIMSVS ';
SET OutputRoot.MQIIH.Authenticator =' ';
SET OutputRoot.MQIIH.TranInstanceId =X'00000000000000000000000000000000';
SET OutputRoot.MQIIH.TranState =MQITS_NOT_IN_CONVERSATION;
SET OutputRoot.MQIIH.CommitMode ='0';
SET OutputRoot.MQIIH.SecurityScope ='C';
SET OutputRoot.MQIIH.Reserved =' '; |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 16, 2003 10:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You should not need to specify the parser on your output nodes. The parser you specify on output nodes or input nodes is only for the contents of the message BODY. You do not have to specify a parser for the MQMD, even though it is used. Similarly you do not need to specify a parser for the MQIIH.
What you have should create the proper header on the queue when you perform your output.
Of course, I've never worked with an MQIIH header, so I am not 100% positive. However, it should work exactly the same as the MQRFH header does, which you don't need to specify the parser for.
As a convenience, you can add the MQIIH message set to your workspace, and add it in a compute node. This will allow you to drag & drop fields from the MQIIH header - but that's the only advantage of doing so. |
|
Back to top |
|
 |
Aarkay |
Posted: Wed Apr 16, 2003 11:32 am Post subject: |
|
|
Newbie
Joined: 15 Apr 2003 Posts: 6
|
Jeff, thatz what i did added MQIIH message set and added to my compute node, Usually no need of logical structure for MQMD coz its default but coming to MQIIH u need to have logical structure. Basically u will be having a default built in message set of MQIIH. Now what i was doing is i have a copy book i mean physical structure of MQIIH , trying to import that and use it in the compute node. while creating the message set u can specify the parser, by default it is MRM. I want to specify as MQIIH. where i got clutched.....
I appreciate your responses... |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 16, 2003 1:36 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay. Do exactly this:
1) Create two queues on your broker queue manager called IIHTESTIN and IIHTESTOUT.
2) Create a new, empty message flow.
3) Insert an MQInputNode. Set the MessageDomain to BLOB. Set the queue name to IIHTESTIN.
3) Insert a compute node. Connect the out terminal of the MQInputNode to this node. Set the compute node to copy message headers.
4) Copy all that code you have above, where you set the values of the MQIIH header in the outputroot, into the ESQL of the compute node.
5) Add as the last line inside the ESQL in the compute node "Set OutputRoot.BLOB = InputRoot.BLOB;"
5) Insert an MQOutput node, pointing to IIHTESTOUT.
6) Wire up the out terminal of the compute node to the in terminal of the MQOutput node
Deploy this to your broker.
Put *any* message into IIHTESTIN. Examine the results of IIHTESTOUT. It should have a brand new IIH header on it.
I just did something very similar, and it worked. The only vaguely tricky thing was that I had to ensure that the MQIIH structure was a previous sibling to the BLOB parser. I did that by only copying message headers, and copying the BLOB parser as the last step of the ESQL. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|