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 » XML Msg to Flat Text Output

Post new topic  Reply to topic
 XML Msg to Flat Text Output « View previous topic :: View next topic » 
Author Message
sboucher
PostPosted: Thu Aug 12, 2004 8:47 am    Post subject: XML Msg to Flat Text Output Reply with quote

Acolyte

Joined: 27 Oct 2002
Posts: 52

I'm having some difficulty navigating/choosing element values from my XML input so I can convert to plain ascii output.

Here is my input:
<?xml version="1.0"?>
<IPA_ZFI_COPA_ACKNOWLEDGEMENT01>
<Header>
<InterfaceID>INTF_0407</InterfaceID>
<InterfaceType>REPLY-800</InterfaceType>
<SourceSystem>
<Name>PLCB</Name>
<DocumentID>SPOS242320040707</DocumentID>
<Date>2004-07-14</Date>
<Time>18:31:41</Time>
</SourceSystem>
<TargetSystem>
<Name>SAP</Name>
<DocumentID>0000000001419924</DocumentID>
<Date>2004-07-29</Date>
<Time>10:11:38</Time>
</TargetSystem>
</Header>
<Body>
<ZFI_MESSAGE_DT>
<MSGSTATUS>53</MSGSTATUS>
<TYPE>S</TYPE>
<ID>RW</ID>
<NUMBER>605</NUMBER>
<MESSAGE>Document posted successfully: BKPFF 2200002935COPA2004 DC1CLNT120</MESSAGE>
</ZFI_MESSAGE_DT>
</Body>
</IPA_ZFI_COPA_ACKNOWLEDGEMENT01>

I only need SourceSystem.DocumentID and ZFI_MESSAGE_DT.MSGSTATUS output as follows:

SPOS24232004070753

This is what I attempted without success using a compute node:

SET OutputRoot=InputBody.(XML.Element)SourceSystem.DocumentID || InputBody.(XML.Element)ZFI_MESSAGE_DT.MSGSTATUS;
SET OutputRoot.MQMD.Format = 'MQSTR ';


USING MQSIv2.1
_________________
Scott A. Boucher
Database Administartor
Back to top
View user's profile Send private message Send e-mail
JT
PostPosted: Thu Aug 12, 2004 10:35 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Try something like this:
Code:
SET OutputRoot.MRM.DocumentID_MSGSTATUS = InputBody.IPA_ZFI_COPA_ACKNOWLEDGEMENT01.Header.SourceSystem.DocumentID ||
InputBody.IPA_ZFI_COPA_ACKNOWLEDGEMENT01.Body.ZFI_MESSAGE_DT.MSGSTATUS;

Quote:
I only need SourceSystem.DocumentID and ZFI_MESSAGE_DT.MSGSTATUS output as follows:

SPOS24232004070753

To produce that result, you'll need to create a CWF message that has a single element defined. Additionally, you'll have to modify the output properties to reflect the change in the message format from XML to CWF).
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Aug 12, 2004 10:41 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Or you could skip the CWF, and just use BLOB.

Code:
SET OutputRoot.BLOB.BLOB=CAST(InputBody.(XML.Element)SourceSystem.DocumentID || InputBody.(XML.Element)ZFI_MESSAGE_DT.MSGSTATUS as BLOB CCSID InputRoot.Properties.CodedCharSetId);
--and do the rest of your MQMD settings

And then add an RCD node to convert from XML to BLOB message domains.
_________________
I am *not* the model of the modern major general.
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 » XML Msg to Flat Text 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.