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 » EmailOut Node in WMBv6.1

Post new topic  Reply to topic
 EmailOut Node in WMBv6.1 « View previous topic :: View next topic » 
Author Message
satya22777
PostPosted: Fri Sep 12, 2008 3:25 am    Post subject: EmailOut Node in WMBv6.1 Reply with quote

Apprentice

Joined: 03 Apr 2006
Posts: 31

Hello Every One,

My Eniveronment is WMBv6.1 in Win2000 professional.

I have Small problem with Emailout node.i.e I used to send the errordetails to the customer in my error handeling flow. I made it easily but i could'nt satisfied. I am getting the body of email is

<Data>SENDERID =2131 RECIEVERID=abcdef MAPNAME =ABCMAP ERRORLOG =LogDetails</Data>

My requirement is:

SENDERID =2131
RECIEVERID =abcdef
MAPNAME = ABCMAP
ERRORLOG =LogDetails



My Code is :

SET OutputRoot.EmailOutputHeader.Subject = 'ERRORLOG DETAILS';
SET OutputRoot.EmailOutputHeader.To = 'xyz@abc.com';
SET OutputRoot.EmailOutputHeader.From = 'TheRisingSun@ibm.in' ;
SET OutputLocalEnvironment.Destination.Email.BodyContentType = 'text/plain';


DECLARE SenderId CHARACTER InputRoot.XMLNSC.Error.SENDERID;
DECLARE RecieverId CHARACTER InputRoot.XMLNSC.Error.RECIEVERID;
DECLARE MapName CHARACTER InputRoot.XMLNSC.Error.MAPNAME;
DECLARE ErrorLog CHARACTER InputRoot.XMLNSC.Error.ERRORLOG;

SET OutputRoot.XMLNSC.Data ='SENDERID ='|| SenderId ||' '||
'RECIEVERID='|| RecieverId ||' '||
'MAPNAME ='|| MapName ||' '||
'ERRORLOG ='|| ErrorLog;

Please any body help me on this..
Back to top
View user's profile Send private message
MrSmith
PostPosted: Fri Sep 12, 2008 3:51 am    Post subject: Reply with quote

Master

Joined: 20 Mar 2008
Posts: 215

Your code to me seems to be doing exactly what you have asked it to do which is create a tag DATA and concatonate all thos values together! If you wanted to format it like your example above then you can either palce an end of line character at the point of each concatanation but that will depend on the platform it si going to be sent to as obviously *nix and Windows and others etc etc have different EOL characters but that would give you

SET OutputRoot.XMLNSC.Data =' \n || SENDERID ='|| SenderId ||'\n '||
'RECIEVERID='|| RecieverId ||'\n'||
'MAPNAME ='|| MapName ||'\n'||
'ERRORLOG ='|| ErrorLog || '\n';

type of thing when \n is your EOL marker (in this case unix)
gives:-

<Data>
SENDERID =2131
RECIEVERID=abcdef
MAPNAME =ABCMAP
ERRORLOG =LogDetails
</Data>
Back to top
View user's profile Send private message
satya22777
PostPosted: Fri Sep 12, 2008 4:17 am    Post subject: Reply with quote

Apprentice

Joined: 03 Apr 2006
Posts: 31

Hi Smith,

Thanks for your Immediate responce, I tried with our suggestion. but i need plain text message in my body of email with out xml like:

SENDERID =2131
RECIEVERID =abcdef
MAPNAME = ABCMAP
ERRORLOG =LogDetails


thanks in advance.
Back to top
View user's profile Send private message
satya22777
PostPosted: Fri Sep 12, 2008 4:25 am    Post subject: Reply with quote

Apprentice

Joined: 03 Apr 2006
Posts: 31

and one more thing..Mr.Smith,

I am getting message in streem before Email node is:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
<MAPTYPE>INBOUND</MAPTYPE>
<SENDERID>2131</SENDERID>
<RECIEVERID>abcdef</RECIEVERID>
<MESSAGETYPE></MESSAGETYPE>
<MAPNAME>ABCMAP</MAPNAME>
<MAPSTATUS>FAILURE</MAPSTATUS>
<ERRORLOG></ERRORLOG>
</Error>

So I am passing this message to Emailout node.
Back to top
View user's profile Send private message
MrSmith
PostPosted: Fri Sep 12, 2008 6:35 am    Post subject: Reply with quote

Master

Joined: 20 Mar 2008
Posts: 215

In which case i would suggest one of 2 things depending on the following:

If there is only ever these 4 fields then create an MRM with 4 elements with terminators of EOL or one element and in the ESQL do what i said earlier with the concat and EOL then ASBITSTREAM into single MRM element and then thats it it will format itself, rem that you need to ensure enough length on elements in MRM and say blank fill or have ellement as ref to another element that has total length value in it

so you would have something like


Set OutputRoot.MRM.Element[1] = InputBody.Error.SENDERID
Set OutputRoot.MRM.Element[2] = InputBody.Error.SENDERID
etc etc.
where in the MRM the terminator is \n (LF) or <CRLF> for windows

or

Set OutputRoot.MRM.Element = ASBITSTREAM(InputBody.Error.SENDERID || '\n' || InputBody.Error.SENDERID etc etc);

Prob not 100% correct in syntax etc but you get the idea
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Sep 12, 2008 7:50 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
If there is only ever these 4 fields then create an MRM with 4 elements with terminators of EOL or one element and in the ESQL do what i said earlier with the concat and EOL then ASBITSTREAM into single MRM element and then thats it it will format itself

I strongly agree. You should be using a message set to do this kind of physical formatting of a message.
Quote:
rem that you need to ensure enough length on elements in MRM and say blank fill or have ellement as ref to another element that has total length value in it
Only if you use CWF. But that would be silly.
If you use TDS with Data Element Separation set to 'Tagged Delimited' then lengths will never be a problem.
Back to top
View user's profile Send private message
satya22777
PostPosted: Fri Sep 12, 2008 9:05 am    Post subject: Reply with quote

Apprentice

Joined: 03 Apr 2006
Posts: 31

Hii Smith & Kimbert

Thanks for valuable suggestions..
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 » EmailOut Node in WMBv6.1
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.