Author |
Message
|
Beaula |
Posted: Wed Sep 11, 2002 4:40 am Post subject: MRM Message to XML with INTEGER Elements |
|
|
Apprentice
Joined: 11 Sep 2002 Posts: 39 Location: Infotech, Madhapur,India
|
I am using WMQI 2.1.
I want to convert a MRM message with STRING & INTEGER elements to XML. If I give only STRING elements, I am able to convert the message to XML, but if I give the second element as INTEGER, I am getting some junk numbers for it. Can you please tell us how to convert the STRING to INTEGER, the ESQL Syntax ?> |
|
Back to top |
|
 |
kirani |
Posted: Wed Sep 11, 2002 2:37 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
I am assuming that you want to convert message from MRM-CWF to XML?
What is your Physical data type for integer element defined into MRM and how are you entering data on the queue? _________________ 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 |
|
 |
lung |
Posted: Wed Sep 11, 2002 5:04 pm Post subject: |
|
|
 Master
Joined: 27 Aug 2002 Posts: 291 Location: Malaysia
|
Usually we define everything in the MRM message set as STRING. Shouldn't have any impact since the message set will only be used in the broker. That is, unless, you need to do some calculations in the broker, in which case the CAST syntax can be used in the compute node.
 _________________ lung |
|
Back to top |
|
 |
Beaula |
Posted: Sun Sep 15, 2002 9:01 pm Post subject: |
|
|
Apprentice
Joined: 11 Sep 2002 Posts: 39 Location: Infotech, Madhapur,India
|
kirani wrote: |
I am assuming that you want to convert message from MRM-CWF to XML?
What is your Physical data type for integer element defined into MRM and how are you entering data on the queue? |
Yes, we are converting from MRM-CWF to XML.
The physical data type for integer element is defined as integer.
The sample message is ABCDEFGHIJ1234.
ABCDEFGHIJ is the string element and 1234 is the integer element.
The ESQL we have given is as follows:
SET OutputRoot.XML.MESSAGE.FILED1=InputBody.EMPLNAME;
SET OutputRoot.XML.MESSAGE.FILED2=InputBody.EMPLNUM;
We are getting the string element properly. The integer element is giving some junk numbers. |
|
Back to top |
|
 |
kirani |
Posted: Sun Sep 15, 2002 9:07 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
If you are entering integer data as 1234 for interger element, your physical type for this element should be set to Extended Decimal and length should be set to 4 bytes.
This will solve your problem. _________________ 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 |
|
 |
jas |
Posted: Sun Sep 15, 2002 11:42 pm Post subject: |
|
|
 Novice
Joined: 28 Jul 2002 Posts: 12
|
kirani wrote: |
If you are entering integer data as 1234 for interger element, your physical type for this element should be set to Extended Decimal and length should be set to 4 bytes.
This will solve your problem. |
However, if this is test data and in the real world will be a true integer value, e.g. set by a program, the test data will need to have the true hex/ascii value of the integer required in it. |
|
Back to top |
|
 |
|