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 » Transforming the input message to output

Post new topic  Reply to topic Goto page 1, 2  Next
 Transforming the input message to output « View previous topic :: View next topic » 
Author Message
nmahesh4mb
PostPosted: Wed Dec 05, 2012 8:19 am    Post subject: Transforming the input message to output Reply with quote

Novice

Joined: 25 May 2012
Posts: 23

Hi I am Receiving message from SAP adapter in dataobject parser I want to create this in pipe delimited format, using the message set is best idea or any way to do using the code itself

output needs like "CUSTOMER_ID|
Custome_Name|

Please giveme any suggestions

thanks and
Regards
Mahesh
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Dec 05, 2012 8:22 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Does your Google not work?

Did you attend the required training?

Did you read the InfoCentre?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Wed Dec 05, 2012 8:23 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

If on v6/v7 use the MRM domain with a TDS format
If on V8, use the DFDL domain
Back to top
View user's profile Send private message
nmahesh4mb
PostPosted: Wed Dec 05, 2012 8:58 am    Post subject: Reply with quote

Novice

Joined: 25 May 2012
Posts: 23

Thanks for your Valuable reply..
you mean to say without message set it's not possible, using the esql code?
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Dec 05, 2012 8:59 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I did not say that. I was quoting best practice.
Back to top
View user's profile Send private message
nmahesh4mb
PostPosted: Thu Dec 06, 2012 12:03 am    Post subject: Reply with quote

Novice

Joined: 25 May 2012
Posts: 23

Hi I have created the TDS message set and I have written the code for to change the properties in logical tree structure, and after that while copying the input tree to output it's giving an error stating that unresolved path you're giving. code is as follows please check If any Mistakes I have done

SET OutputRoot.Properties.MessageFormat = 'Text_CSV';
SET OutputRoot.Properties.MessageSet = 'GU5GT2K002001';
SET OutputRoot.Properties.MessageType = 'Root';
CREATE LASTCHILD OF OutputRoot DOMAIN ('MRM');
SET OutputRoot.MRM.Root.Body.Name = InputRoot.XMLNSC.Input.Name;
it's showing at MRM path only..
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Dec 06, 2012 1:10 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
t's giving an error stating that unresolved path you're giving
I do not understand that sentence. I suspect that nobody else does either.
If you want help, please take the time to quote the error message carefully and accurately.
Back to top
View user's profile Send private message
nmahesh4mb
PostPosted: Fri Dec 07, 2012 1:15 am    Post subject: About CSV format message headers Reply with quote

Novice

Joined: 25 May 2012
Posts: 23

Hi I'm creating the CSV message set and it's almost done, I'm geting the output in the output I want the headers also

now the output is showing like this

6089|9000001555|2012-11-08|0010266133
6089|9000001557|2012-11-12|0010000244
6089|9000001558|2012-11-13|0011290733
6089|9000001559|2012-11-13|0011290739

but my requirements is to display headers also

C_no|PhoneNo|date|servicerequest

6089|9000001555|2012-11-08|0010266133
6089|9000001557|2012-11-12|0010000244
6089|9000001558|2012-11-13|0011290733
6089|9000001559|2012-11-13|0011290739

the above mentioned is headers which I have created in message set please let me know any option is there to enable header in output message

Thanks in advance
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Dec 07, 2012 2:13 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
the above mentioned is headers which I have created in message set please let me know any option is there to enable header in output message
You have not created any 'headers' in the message set. You have created elements in a message definition file.
If OutputRoot.MRM does not contain the headers then they will not be output.
Back to top
View user's profile Send private message
nmahesh4mb
PostPosted: Fri Dec 07, 2012 2:38 am    Post subject: Reply with quote

Novice

Joined: 25 May 2012
Posts: 23

what is the option to choose to create headers? please hint me..
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Dec 07, 2012 3:05 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Here's the hint:
Quote:
If OutputRoot.MRM does not contain the headers then they will not be output.
Back to top
View user's profile Send private message
nmahesh4mb
PostPosted: Fri Dec 07, 2012 3:12 am    Post subject: Reply with quote

Novice

Joined: 25 May 2012
Posts: 23

thanks for your input, It's throwing an error if i write with header like

SET OutputRoot.MRM.CSV_Message.SAPOutput

here CSV_Message is the header and sapoutput is the root tag, this is what I'm writing the code it's trowing error as unresolved path, if I use without CSV_Message it's not throwing exception and I'm getting the output with out header...
any thing wrong going in this plese let me know
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Dec 07, 2012 3:36 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

OK - some tips for you:

1. This line can be removed:
Code:
CREATE LASTCHILD OF OutputRoot DOMAIN ('MRM');
You do not need to create the parser for the OutputRoot message tree - WMB will do that automatically, based on the name of node ( 'MRM' in your case ).

2. This line is probably incorrect:
Code:
SET OutputRoot.MRM.Root.Body.Name = InputRoot.XMLNSC.Input.Name;
The MRM message tree never contains the root element. Don't ask why - it just doesn't. So it probably should be
Code:
SET OutputRoot.MRM.Body.Name = InputRoot.XMLNSC.Input.Name;


Quote:
if I use without CSV_Message it's not throwing exception and I'm getting the output with out header...
So 2. explains why your code stops throwing an exception. I do not know why the output does not contain your 'headers'. You would need to describe your message model and post the output from a Trace node. But please do not do that yet - you can debug this yourself using Trace nodes and user trace ( mqsichangetrace, mqsireadlog, mqsiformatlog ). Let me know if you want help with getting the trace.
Back to top
View user's profile Send private message
nmahesh4mb
PostPosted: Fri Dec 07, 2012 4:47 am    Post subject: Reply with quote

Novice

Joined: 25 May 2012
Posts: 23

Hi thanks for the input, I have tried the code what you have suggested and I have created the message set in CSV format details are
Message: OutCsv
Under this : Heads
Name, Age are elements

I have wrote the code as Outputroot.OutCsv.heads.name = inputroot;
it's showing the error as unresolvable path, even I have deployed it and it's not giving the headers in output message

please correct me if any wrong in code..
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Dec 07, 2012 4:58 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Hi thanks for the input
Well, I'm glad you appreciated it. But you don't seem to have *followed* it

I suggest that you re-read what I said, and try out my suggestions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Transforming the input message to output
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.