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 » Troubles with index

Post new topic  Reply to topic
 Troubles with index « View previous topic :: View next topic » 
Author Message
krustyelpayaso
PostPosted: Mon Nov 14, 2005 1:27 am    Post subject: Troubles with index Reply with quote

Apprentice

Joined: 24 Oct 2005
Posts: 26

Hi,
i have the next code:

SET J = CARDINALITY(OutputRoot.XML.infosIdFound_reste[]);
SET I = 1;
WHILE I <= J DO
SET OutputRoot.XML.infosIdFound_reste[I] = NULL;
SET I = I + 1;
END WHILE;
It's a single code which clean a tree with Nulls. I've follow the process with the debugger. The cardinality is 6. The trouble arrive when the i index has the value 4. The code error is 'array subscript error' when it try 'SET OutputRoot.XML.infosIdFound_reste[I] = NULL;'. Anybody know can it happend? It's very strange...

thanks
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Nov 14, 2005 1:59 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

hi krustyelpayaso,

Its a simple issue

Let me try to explain......you have 6 rows....

First While loop

Available Lines: 6
You Reference and delete: 1st

Second While loop

Available Lines: 5
You Reference and delete: 2nd

Third While

Available Lines: 4
You Reference and delete: 3rd

Forth While

Available Lines: 3
You Reference and delete: 4th

Which is not Possible to do !!

Now get your code right....I think u will manage the rest

Regards
Back to top
View user's profile Send private message Send e-mail
krustyelpayaso
PostPosted: Mon Nov 14, 2005 2:23 am    Post subject: Reply with quote

Apprentice

Joined: 24 Oct 2005
Posts: 26


You're right!. Everytime i set nulls into the tree, the element disappear of memory. I have put:

SET J = CARDINALITY(OutputRoot.XML.infosIdFound_reste[]);
SET I = 1;
WHILE I <= J DO
SET OutputRoot.XML.infosIdFound_reste[1] = NULL;
SET I = I + 1;
END WHILE;

A lots of thanks!
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Nov 14, 2005 3:32 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Glad to have been of help....

I hope u know that the field u set to NULL will not show in output....if u want it blank then it should be FIELDVALUE = NULL....

Why dont u mark the topic solved for others....

regards.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Troubles with index
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.