|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMQI message flow creating OTMA / IMS Headers |
« View previous topic :: View next topic » |
Author |
Message
|
CHERIANV |
Posted: Fri Jan 21, 2005 9:32 am Post subject: WMQI message flow creating OTMA / IMS Headers |
|
|
Apprentice
Joined: 15 Feb 2002 Posts: 43 Location: New York
|
Hi,
I am working on an SAP IDOC to MRM transformation and am constructing a target MRM that has MQMD + OTMA Header + IMS transaction Header + Application Data. Not being too familiar with the OTMA / IMS Header structures, I created an MRM that comprised of the 84 byte OTMA + 158 byte IMS trans. header + application data. In the MQMD , I set the format field in the MQMD to 'MQSTR'. Everything worked fine but the target system was unable to parse the message and asked me to set the format field in the 'MQMD' to 'MQIMS'. But when I set this field to 'MQIMS', I dont see this field populated in the MQMD . I'm ale to see it when I set it to 'MQSTR'. I 'm not sure if its becos I'm using my own MRM to create the OTMA Header and not using the MQIIH provided in WMQI. Here's how I'm setting my fields in the ESQL . Any help is appreciated.
SET OutputRoot.MQMD = InputRoot.MQMD;
SET OutputRoot.MQMD.Format = 'MQIMS ';
SET OutputRoot.MQMD."Encoding" = 785;
SET OutputRoot.MQMD.CodedCharSetId = 500;
SET OutputRoot.MQMD.MsgId = MQMI_NONE;
SET OutputRoot.MQMD.UserIdentifier = 'MQSOP00';
SET OutputRoot.MQMD."Format" = 'MQIMS';
SET OutputRoot.MRM = ' ';
-- Assign fields in the OTMA Header;
SET "OutputRoot"."MRM".ID_VAL = 'IIH';
SET "OutputRoot"."MRM".VER = 1;
SET "OutputRoot"."MRM".HDR_LEN = 84;
SET "OutputRoot"."MRM".ENCODING = 785;
SET "OutputRoot"."MRM".CCS_ID = 0;
SET "OutputRoot"."MRM".FORMAT_VAL = 'MQIMSVS';
SET "OutputRoot"."MRM".FLAGS = 0;
SET "OutputRoot"."MRM".LT_OVER = ' ';
SET "OutputRoot"."MRM".MFS = ' ';
SET "OutputRoot"."MRM".REPLY = ' ';
SET "OutputRoot"."MRM".AUTH = ' ';
SET "OutputRoot"."MRM".TRANSIID = ' ';
SET "OutputRoot"."MRM".STATE = ' ';
SET "OutputRoot"."MRM".COMM = '0';
SET "OutputRoot"."MRM".SEC = 'C';
SET "OutputRoot"."MRM".RSVD = ' ';
Regards,
Cherian |
|
Back to top |
|
 |
tillywern |
Posted: Fri Jan 21, 2005 10:18 am Post subject: Message Format |
|
|
 Centurion
Joined: 28 Jan 2003 Posts: 109 Location: Colorado
|
Good observation. I haven't been around OTMA in a while but it would not surprise me that MB wants to limit your options as you have suggested.
In short you may have to go through abnormal gyrations in MB to trick it. You may need to change message spaces and re-evaluate the message a a blob or something similiar if you can specify the format as MQIMS with the origional message space selected ad MRM.
You shoudl be able to tyy this easy enough by adding a node right before your output node and tinkering with the options there.,
I hope this is of some value. |
|
Back to top |
|
 |
EddieA |
Posted: Fri Jan 21, 2005 12:23 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Note: I haven't actually tried this, so I could be way off the mark here.
Shouldn't the MRM definition be only the message payload, without the IMS header. You should build the IMS header as a seperate tree: OutputRoot.MQIIH.xxxx. That way, the Broker knows of the additional headers, and can set the Formats correctly.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
JT |
Posted: Fri Jan 21, 2005 12:42 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Quote: |
Shouldn't the MRM definition be only the message payload, without the IMS header. |
Eddie, you're correct. The values for the MQ/IMS-bridge header should be set outside of your message payload (MRM). The message structure built by your ESQL code should be:- Properties Header
- Message Descriptor Header (MQMD)
- IIH Header (MQIIH)
- Message payload (which is broken down below:)
Here's an example of the construction of an IIH header:
Code: |
SET OutputRoot.MQIIH.StrucId = MQIIH_STRUC_ID;
SET OutputRoot.MQIIH.Version = MQIIH_VERSION_1;
SET OutputRoot.MQIIH.StrucLength = MQIIH_LENGTH_1;
SET OutputRoot.MQIIH.Encoding = InputRoot.MQMD.Encoding;
SET OutputRoot.MQIIH.CodedCharSetId = InputRoot.MQMD.CodedCharSetId;
SET OutputRoot.MQIIH.Format = MQFMT_IMS_VAR_STRING;
SET OutputRoot.MQIIH.Flags = MQIIH_NONE;
SET OutputRoot.MQIIH.LTermOverride =
THE (SELECT ITEM T from InputRoot.XML.MdtMessage.Request.Param[] AS T WHERE T.(XML.Attribute)name = 'LTERM');
SET OutputRoot.MQIIH.MFSMapName =
THE (SELECT ITEM T from InputRoot.XML.MdtMessage.Request.Param[] AS T WHERE T.(XML.Attribute)name = 'MFSMAP')
SET OutputRoot.MQIIH.ReplyToFormat = MQFMT_IMS_VAR_STRING;
SET OutputRoot.MQIIH.Authenticator = ' ';
SET OutputRoot.MQIIH.TranInstanceId = MQITII_NONE;
SET OutputRoot.MQIIH.TranState = MQITS_NOT_IN_CONVERSATION;
SET OutputRoot.MQIIH.CommitMode = MQICM_SEND_THEN_COMMIT;
SET OutputRoot.MQIIH.SecurityScope = MQISS_CHECK;
SET OutputRoot.MQIIH.Reserved = ' '; |
Our message payload definition (MRM) consists of a 2-byte integer element that declares the length of the payload (plus 4-bytes for the LLZZ), followed by a string element with a physical type of 'length encoded string 2'. The first two positions of the string are allocated for the ZZ portion of the LLZZ, which represents the length of the actual payload. The next 8-bytes of the string are set to the IMS trancode, followed by the transaction data.
See this link for details of the MQ/IMS-bridge transaction:
http://www-306.ibm.com/software/integration/mqfamily/library/manualsa/csqzal05/csqzal0544.htm
Hope this helps. |
|
Back to top |
|
 |
CHERIANV |
Posted: Fri Jan 21, 2005 1:44 pm Post subject: |
|
|
Apprentice
Joined: 15 Feb 2002 Posts: 43 Location: New York
|
Thanks all! That was right ! The MQIIH header should'nt be created part of the message payload MRM and the format would'nt be set correctly by the Broker if you dont use the MQIIH structure assignment provided by the Broker following the MQMD. I just tried it and got it working .
Cheers,
Cherian |
|
Back to top |
|
 |
kman |
Posted: Wed Mar 01, 2006 11:57 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
Hi JT or anybody else with same interest,
I am still curious how you did the IMS message modelling. Looks to me you are doing it as CWF, with the local element having physical type of Length Encoded String 2. I assume this is because LL is 2 bytes, and ZZ also 2 bytes, so you have both ZZ and LL as local element. That's what I would think.
Alernatively, the LLZZ can be done in the same manner as TDS Tagged Encoded Length, with properties
Length of Tag = 4,
Length of Encoded Length = 2,
Extra Chars in Encoded Length = 4
wouldn't it be so? |
|
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
|
|
|
|