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 » How to store the message as STRING

Post new topic  Reply to topic
 How to store the message as STRING « View previous topic :: View next topic » 
Author Message
WBI_user
PostPosted: Mon Nov 05, 2001 10:40 pm    Post subject: Reply with quote

Partisan

Joined: 07 Aug 2001
Posts: 386

As part of error logging, my customer wants to store the original message as character string in the data base together with the error code and time stamp. They also want to see the same information on a queue.

I have to handle exceptions for two types of inout messages. One is a XML message up to 10,000 bytes with many fileds, the 2nd tyoe is an MRM message up to 10,000 bytes with many fields.

Here is what I am trying to do:
I do not connect any failure terminal of the nodes in my flow. I only connect the catch terminal of the Input node to a compute node followed by a database node and a output node.

In the compute node I examine the exceptionlist and pick up the error number and the error label.
I created a MRM error log message with 4 fields for the output of the compoute node.
timestamp (20 char)
error_code (10 char)
error_node (30 char)
error_msg (10000 char)

In the database node that follows the compute node, I'll store the message in four columns similar to the MRM (i.e. timestamp, error_code, error_node, error_msg)

I have an assumption here that If an exception is throw inside the flow, I'll always get the original input message together with the exception list at the catch terminal of the Input node? Is this a valid assumption ?

I have no problem moving the time stamp, error_code and error_node into the MRM. But I don't know how to put the original message into error_msg.

I tried
SET OutputRoot.MRM.ERROR_MSG = InputBody;
with no luck.

Can some one help ?

Back to top
View user's profile Send private message
Tibor
PostPosted: Mon Nov 05, 2001 11:26 pm    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

1. simplest, but not elegant if you don't like BLOB:

OutputRoot..... = bitstream(InputBody)

2. if you have a 'flat' tree structure, just make a loop with 'anonymous fields' (.*[]) and concatenate all values: (not tested!!)


set i = 1;
set c = cardinality(InputBody.*[]);
set s = '';

while i < c do
set s = s || cast( InputBody.*[i] as string);
set i = i + 1;
end while;

set OutputRoot... = s;

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to store the message as STRING
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.