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 » Problem with indexing in the loop for xml msg

Post new topic  Reply to topic
 Problem with indexing in the loop for xml msg « View previous topic :: View next topic » 
Author Message
busy_chap
PostPosted: Thu Sep 20, 2007 7:51 am    Post subject: Problem with indexing in the loop for xml msg Reply with quote

Acolyte

Joined: 18 May 2006
Posts: 69

Hello guys,
This might be a fairly simple question but I have googled a lot but found nothing so posting this problem here for any advice.

Please look at the following:
WHILE I<=J DO
IF (Environment.Variables.Int[Indx]."A" = 'Y') THEN

SET OutputRoot.XML.TS.TSHeader[nInd].Item[nInter].Date = GRP_DATE;
SET nInter = nInter+1;

ELSE

SET OutputRoot.XML.TS.TSHeader[nInd].Pay[nInter].Date = REC_DATE;
SET nInter = nInter+1;
END IF;

SET I = I+1;
END WHILE;

Can I use nInter as the index for both Item and Pay? I tried this , but I get an Array subscript error. If I use different index for pay and Item,I am getting the XML msg but positioning of the children is wrong.

Can anybody suggest me how I can use the same index in the above statement? has anybody come across this issue?
Thanks in advance.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 20, 2007 7:55 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

One reason why array subscript errors occur in ESQL is when the code is trying to set, for example, the SECOND element in the (it's not an array)Array when the FIRST element doesn't already exist.
_________________
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 » Problem with indexing in the loop for xml msg
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.