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 » Accessing attribute using Reference

Post new topic  Reply to topic
 Accessing attribute using Reference « View previous topic :: View next topic » 
Author Message
samchenchu
PostPosted: Tue Nov 19, 2013 8:34 pm    Post subject: Accessing attribute using Reference Reply with quote

Novice

Joined: 13 Aug 2013
Posts: 22

Hi,

My xml looks as below.
<root>
<os:ADDRESS>
<of:ADDRLINE index="1">Bombay</of:ADDRLINE>
<of:ADDRLINE index="2">MUMBAI</of:ADDRLINE>
<of:ADDRLINE index="3">BANG</of:ADDRLINE>
<of:ADDRLINE index="4">HYD</of:ADDRLINE>
</os:ADDRESS>
</root>

I took reference for ADDRESS and navigating one by one.I am not able to access index attribute using the reference. When i am at first place the reference value is coming as Bombay,2nd postion mumbai.

Please help me how to access the index attaribute using the reference?

Code:

DECLARE RF_InBdyAddr REFERENCE TO RF_InBdy.*:Req.*:Dta.*:SYNC_CUSTOMER_005.*:DATAAREA.*:SYNC_CUSTOMER.*:PARTNER.*:ADDRESS;
MOVE InBdyAddr  Firstchild;
WHILE LASTMOVE(RF_InBdyAddr) DO
IF RF_InBdyAddr.(XMLNSC.Attribute)index = '1' THEN
SET RF_OutCstPartyMaster.Location.Address.AddressLine1 = FIELDVALUE(RF_InBdy.*:Req.*:Dta.*:SYNC_CUSTOMER_005.*:DATAAREA.*:SYNC_CUSTOMER.*:PARTNER.*:ADDRESS.*:ADDRLINE);
END IF;
MOVE RF_In_Employee NEXTSIBLING REPEAT TYPE NAME;   
END WHILE;
Back to top
View user's profile Send private message
Simbu
PostPosted: Wed Nov 20, 2013 1:21 am    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

you should first refer to ADDRLINE before accessing index attribute.
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Nov 20, 2013 1:29 am    Post subject: Re: Accessing attribute using Reference Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

samchenchu wrote:

Code:

MOVE InBdyAddr  Firstchild;
WHILE LASTMOVE(RF_InBdyAddr) DO
-- do stuff
MOVE RF_In_Employee NEXTSIBLING REPEAT TYPE NAME;   
END WHILE;


Looks like an infinite loop... you never move InBdyAddr within the while block.
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Nov 20, 2013 5:45 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

One day the customer said: from now on you must always use references...

Try changing this
Code:
SET RF_OutCstPartyMaster.Location.Address.AddressLine1 = FIELDVALUE(RF_InBdy.*:Req.*:Dta.*:SYNC_CUSTOMER_005.*:DATAAREA.*:SYNC_CUSTOMER.*:PARTNER.*:ADDRESS.*:ADDRLINE);


to this
Code:
SET RF_OutCstPartyMaster.Location.Address.AddressLine1 = FIELDVALUE(RF_InBdyAddr);
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 » Accessing attribute using Reference
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.