ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Data Conversion , CWF to XML

Post new topic  Reply to topic
 Data Conversion , CWF to XML « View previous topic :: View next topic » 
Author Message
pvemuri
PostPosted: Tue Feb 10, 2004 10:02 pm    Post subject: Data Conversion , CWF to XML Reply with quote

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
View user's profile Send private message Send e-mail
kirani
PostPosted: Tue Feb 10, 2004 11:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
pvemuri
PostPosted: Wed Feb 11, 2004 12:12 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Data Conversion , CWF to XML
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.