|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Data Conversion , CWF to XML |
« View previous topic :: View next topic » |
Author |
Message
|
pvemuri |
Posted: Tue Feb 10, 2004 10:02 pm Post subject: Data Conversion , CWF to XML |
|
|
 Voyager
Joined: 05 Jan 2004 Posts: 83 Location: CA, USA
|
Hi all,
I have created the following C structure :
Code: |
struct Purchase {
char so[6];
int itmno;
};
|
I created a message set and imported the above C structure. Then I created a compound type and also created a message. I completed all the formalities like, providing the correct values in the MQInput node that relates to the message set I am using. I have an output node and also a compute node.
The ESQL code in the COMPUTE node looks like this:
I selected the radio button that says "Copy message headers".
Code: |
SET OutputRoot.Properties.MessageFormat = 'XML';
SET "OutputRoot"."XML"."SalesOrder"."SO" = "InputBody"."so";
SET "OutputRoot"."XML"."SalesOrder"."ITEMNO" = "InputBody"."so";
|
And for my input of AAABBB123456 The output I get is
Quote: |
<SalesOrder><SO>AAABBB</SO><ITEMNO>842150450</ITEMNO></SalesOrder> |
I want to use my ITEMNO field as an integer to do some computations like multiplying it with some number etc; I dont know how to use the CAST fucntion of ESQL. Please help me out.
Thanks in advance,
pvemuri |
|
Back to top |
|
 |
kirani |
Posted: Tue Feb 10, 2004 11:26 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
How are you putting this message on the queue?
You must use appropriate C/C++ program, which puts message on the queue in C structure format. Currently, you are entering numeric data in string format, which is incorrect. _________________ 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 |
|
 |
pvemuri |
Posted: Wed Feb 11, 2004 12:12 am Post subject: |
|
|
 Voyager
Joined: 05 Jan 2004 Posts: 83 Location: CA, USA
|
Hi Kiran,
Let me thank you for the reply.
I am using the MQExplorer to put the message "ABCABC123456" into the queue. I right click on the queue to put the test message. And view the respective output queue for output.
But when I use a C Structure, all of whose fields are declared as characters, I dont have any problem. I get an XML output. Only when I have any integers in the C Structure I am facing these problems. Hope I am clear.
Thank you,
Phani. |
|
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
|
|
|
|