|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XML -> MRM using CWF problem |
« View previous topic :: View next topic » |
Author |
Message
|
RichA |
Posted: Mon Apr 15, 2002 6:45 am Post subject: |
|
|
 Centurion
Joined: 14 Mar 2002 Posts: 102
|
I've recently changed from MQSI 2.0.2 to WMQI 2.1 on Win2K
Using a similar approach as I was with 2.0.2 I am converting between an XML Message to a fixed width message -
<XMLCLIENTN>
<PROCEDURE>CLIENTN</PROCEDURE>
<CLIENTNUM>8949</CLIENTNUM>
</XMLCLIENTN>
to -
CLIENTN 008949
I've added a Physical format to the messageset containing my output message and in the message I have set the length of procedure to 10, left justified and space as the padding character, the clientnum is an integer with a length of 6 and padding character '0'.
my ESQL reads -
SET "OutputRoot"."MRM"."ClientNumber" = "InputBody"."XMLCLIENTN"."CLIENTNUM";
SET "OutputRoot"."MRM"."Procedure" = "InputBody"."XMLCLIENTN"."PROCEDURE";
SET OutputRoot.Properties.MessageSet = 'DPD2134074001';
SET OutputRoot.Properties.MessageType = 'CLIENTN_REQ';
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageFormat = 'CWF';
However the formatting doesn't seem to occur after the compute node the MRM contains CLIENTN8949 with no padding, this throws an error -
Text - An Attempt was made to parse/write but no descriptor was loaded for the CWF worker
Number - 5349
Any idea what I'm doing wrong?
|
|
Back to top |
|
 |
kirani |
Posted: Mon Apr 15, 2002 8:27 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Have you assigned the MessageSet to the Broker or not? Make sure your CWF ID in ESQL is correct.
You should define Physical Type as Extended Decimal and LengthCount as 6 for ClientNumber. This will give you fixed length output.
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
RichA |
Posted: Tue Apr 16, 2002 12:09 am Post subject: |
|
|
 Centurion
Joined: 14 Mar 2002 Posts: 102
|
Yes, the message set is assigned to the broker, the TDS Wire format identifier is TDS, I have changed the SQL to -
SET OutputRoot.Properties.MessageFormat = 'TDS';
is this what you mean?
Where can I define the physical type as extended decimal in 2.1 I found how to do this in 2.0.2 but there only seems to be decimal or integer in 2.1 and they both have the length count and padding character options. |
|
Back to top |
|
 |
kirani |
Posted: Tue Apr 16, 2002 8:59 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
In your case you must add CWF (not TDS) as 'Physical Wire Format' to your message set.
Your properties in compute node remains same,
SET OutputRoot.Properties.MessageSet = 'D.....';
SET OutputRoot.Properties.MessageType = 'CLIENT_REQ';
SET OutputRoot.Properties.MessageFormat = 'CWF';
SET OutputRoot.Properties.MessageDomain = 'MRM';
DECIMAL and INTEGER are MRM logical types. To change Physical type of an element, goto your 'Types' folder in Messageset view and checkout appropriate Type for your message. Now click on ClientNumber element and click on CWF tab. In Physical Type you can select Extended Decimal and assign length to this field in 'Length Count'.
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
RichA |
Posted: Wed Apr 17, 2002 12:02 am Post subject: |
|
|
 Centurion
Joined: 14 Mar 2002 Posts: 102
|
Oops, I must have selected tagged/delimited when I meant to choose custom wire format when I added the physical format, I wondered where TDS had come from, I thought I had checked this, obviously not, thanks for pointing out my stupidity :razz:
[ This Message was edited by: RichA on 2002-04-17 01:03 ] |
|
Back to top |
|
 |
Cliff |
Posted: Thu May 30, 2002 4:11 am Post subject: |
|
|
Centurion
Joined: 27 Jun 2001 Posts: 145 Location: Wiltshire
|
Yes, you can.
One way of doing this is to make the target field string data type in the MRM, and in the CWF set it to right justified and specify a padding character of '0'. You can do any intermediate manipulations in INTEGER or DECIMAL variables, then cast as CHAR when you assign to the output field.
HTH - Cliff |
|
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
|
|
|
|