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 » ' in Trace node

Post new topic  Reply to topic
 ' in Trace node « View previous topic :: View next topic » 
Author Message
AkankshA
PostPosted: Mon Aug 25, 2008 8:14 pm    Post subject: ' in Trace node Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

I have trace ndoe in between my flow to log the message in a file..

The concern i am facing is that a pattern of

TRACING INPUT ${Body} and environment ${..... }

outputs the message in file as

'TRACING INPUT' ${Body} 'and environment' ${..... }

Is there a way to get rid of these ' in the flie.. [/b]
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
marko.pitkanen
PostPosted: Mon Aug 25, 2008 10:43 pm    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

Perhaps you could try something like below with trim -function:

PATTERN

firstname = ${Root.MRM.etunimi}, surname = ${Root.MRM.sukunimi} and timestamp was ${current_timestamp}
firstname = ${trim(both '''' from Root.MRM.etunimi)}, surname = ${trim(both '''' from Root.MRM.sukunimi)} and timestamp was ${current_timestamp}

OUTPUT
firstname = 'marko', surname = 'pitkanen' and timestamp was 2008-08-26 09:38:51.250
firstname = marko, surname = pitkanen and timestamp was 2008-08-26 09:38:51.250


Marko
Back to top
View user's profile Send private message Visit poster's website
AkankshA
PostPosted: Mon Aug 25, 2008 11:50 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

In my case the text i write in pattern (the words which would be printed as is) gets included in quotes

I am at MB 6.00
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
mgk
PostPosted: Wed Aug 27, 2008 7:21 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

No, there is no way to remove the ' (single quote) characters from the output of the trace node that is placed around literals in the pattern. Why would you want to?
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Aug 27, 2008 7:25 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

mgk wrote:
No, there is no way to remove the ' (single quote) characters from the output of the trace node that is placed around literals in the pattern. Why would you want to?


Perhaps marko is attempting to use Trace node to perform file output functions, instead of the file output node.

Perhaps marko is merely attempting to use Trace node to generate machine consumable traces that can be handled without significant extra munging.
Back to top
View user's profile Send private message
broker_new
PostPosted: Wed Aug 27, 2008 6:16 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

In either of the cases very well explained by mqjeff have to be handled using Java Compute Node and write the payload into a file...
Back to top
View user's profile Send private message
AkankshA
PostPosted: Thu Aug 28, 2008 8:19 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

mgk wrote:
No, there is no way to remove the ' (single quote) characters from the output of the trace node that is placed around literals in the pattern. Why would you want to?


well.. i have found a workaround for the same..

store the literals in environment tree..
SET Environment.Var.test = 'TEST' ;

${trim(both '''' from Environment.Var.test)},

result in file is just TEST without any quotes...




now the issue i am facing is my log file has data printed in ANSI encoding standard but i want the same in UTF 8..

nyone knows the value for that..
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Thu Aug 28, 2008 8:27 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You should not be using a trace node for this.
Typically the trace node output would be $Root, $Environment, $ExceptionList and any separators you would want....and leave the formating as it is...

The node is really meant to look at the data and help figure out why the message went to the exception node....

For formated output you can use either a JCN or a java callout.
Look at the java.logging API.....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
marko.pitkanen
PostPosted: Thu Aug 28, 2008 10:14 pm    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Quote:
For formated output you can use either a JCN or a java callout


Or send them as a messages to the q and read them to the file system with separate process..

Marko
Back to top
View user's profile Send private message Visit poster's website
AkankshA
PostPosted: Thu Aug 28, 2008 11:27 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

well i am using env variable to specify the header tags of log file/msg and my entire message is followed by the tag... along with exception..
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Fri Aug 29, 2008 3:32 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You should be using FileOutput, and not Trace.
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 » ' in Trace node
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.