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 » Repeting Elements

Post new topic  Reply to topic
 Repeting Elements « View previous topic :: View next topic » 
Author Message
prabhu1950
PostPosted: Fri Jul 16, 2004 6:38 am    Post subject: Repeting Elements Reply with quote

Novice

Joined: 27 May 2004
Posts: 10

Hi,

I have a difficulty in dealing with the repeating elements. I am trying to send the Person height details to the ouput message elements.

the output message shoule be like this,

<Subject>
<PersonHeightMeasure PersonHeightUnitCode = "ft">5</PersonHeightMeasure>
<PersonHeightMeasure PersonHeightUnitCode = "in">11</PersonHeightMeasure>
</Subject>

But my result shows only 'in' value i.e 11.

The ESQL Code looks like this

SET OutputRoot.MRM.Subject[J].PersonHeightMeasure.PersonHeightUnitCode = 'ft';
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure = TRIM(OutputRoot.XML.Data.Results[J].XXX_HT_FEET);

SET OutputRoot.MRM.Subject[J].PersonHeightMeasure.PersonHeightUnitCode = 'in';
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure = TRIM(OutputRoot.XML.Data.Results[J].XXX_HT_INCHES);

Can anybody please help me in this regard.

Many Thanks,

Sri
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jul 16, 2004 7:14 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you want to set an XML Attribute, you need to indicate that the field type you are setting is XML Attribute.
Code:

SET OutputRoot.MRM.Subject[J].PersonHeightMeasure.(XML.Attribute)PersonHeightUnitCode = 'ft';

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JT
PostPosted: Fri Jul 16, 2004 7:20 am    Post subject: Reply with quote

Padawan

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

Code:
DECLARE K INTEGER 1;
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure[K].(XML.Attribute)PersonHeightUnitCode = 'ft';
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure[K] = TRIM(OutputRoot.XML.Data.Results[J].XXX_HT_FEET);
SET K = K + 1;
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure[K].(XML.Attribute)PersonHeightUnitCode = 'in';
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure[K] = TRIM(OutputRoot.XML.Data.Results[J].XXX_HT_INCHES);
Back to top
View user's profile Send private message
prabhu1950
PostPosted: Fri Jul 16, 2004 7:34 am    Post subject: It Worked Reply with quote

Novice

Joined: 27 May 2004
Posts: 10

Hi JT,

Great! It Worked.

Thanks a lot.

Sri
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 » Repeting Elements
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.