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 » saving reference variable in the loop

Post new topic  Reply to topic
 saving reference variable in the loop « View previous topic :: View next topic » 
Author Message
miron
PostPosted: Wed Sep 18, 2002 6:13 am    Post subject: saving reference variable in the loop Reply with quote

Apprentice

Joined: 27 Jun 2002
Posts: 39
Location: New York

Hello,

I would appreciate some help...
I have following scenario:

declare myref reference to xml.something[1]
while lastmove(myref)
if myref.field1 = something then
do something..
end if
move myref nextsibling repeat name;
end while

My questions are:
1. How can I leave the while loop when i find correct value of field1?
Can i use lastchild? if so how? I tried to set lastmove(myref)=false but it does not work.
2. How can i save value of myref pointer so I can use it later in the code without going thru same loop again?
I tried to declare another pointer myref2 with reference to myref but it does not work.

Thanks for help.
Miron
Back to top
View user's profile Send private message
kirani
PostPosted: Wed Sep 18, 2002 7:14 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

1. Try moving your reference variable myref to LASTCHILD when you find the correct value.

2. Declare a new reference variable (myref2) outside the while loop. Assign value of myref to myref2 when you find the correct value.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » saving reference variable in the loop
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.