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 » Database interaction issues in WBIMB 5.0 CSD 4 + Updates

Post new topic  Reply to topic
 Database interaction issues in WBIMB 5.0 CSD 4 + Updates « View previous topic :: View next topic » 
Author Message
EKhalil
PostPosted: Wed Mar 09, 2005 11:18 am    Post subject: Database interaction issues in WBIMB 5.0 CSD 4 + Updates Reply with quote

Voyager

Joined: 29 Apr 2003
Posts: 99
Location: Boston, MA

This is a production query that has been working fine in prod environment on 2.1 Integrator.

This is the esql for the query:
SET Environment.Variables.Result[storageNoCnt] = THE (SELECT ITEM A.HUB_CD_CODE_NAME FROM Database.HUB_CD_TRANSLATION AS A
WHERE A.HUB_CD_GROUP_NAME = 'LOB'
AND A.HUB_CD_SYSTEM_ID = 'SBL'
AND A.HUB_CD_GROUP_ID =
THE (SELECT ITEM B.HUB_CD_GROUP_ID FROM Database.HUB_CD_TRANSLATION AS B
WHERE B.HUB_CD_CODE_NAME = inMRMpolicyAREA.SPA_POLICY_RETURN[storageNoCnt].SPA_POLICY_AREA.SPA_LOB
AND B.HUB_CD_GROUP_NAME ='LOB'
AND B.HUB_CD_SYSTEM_ID = 'LEG'


This is our exception handling output:
".....RecoverableException 2437. Error detected, rethrowing. array subscript error. See [Exception Handling Trace.txt] log file for more information.......
<Text>SET Environment.Variables.Result[storageNoCnt] =
THE (SELECT ITEM COLUMN(0) FROM DATABASE(SELECT A.HUB_CD_CODE_NAME FROM HUB_CD_TRANSLATION A WHERE (((A.HUB_CD_GROUP_NAME)=(&apos;LOB&apos;))AND((A.HUB_CD_SYSTEM_ID)=(&apos;SBL&apos;)))AND((A.HUB_CD_GROUP_ID)=(?)),
THE (SELECT ITEM COLUMN(0) FROM DATABASE(SELECT B.HUB_CD_GROUP_ID FROM HUB_CD_TRANSLATION B WHERE (((B.HUB_CD_CODE_NAME)=(?))AND((B.HUB_CD_GROUP_NAME)=(&apos;LOB&apos;)))AND((B.HUB_CD_SYSTEM_ID)=(&apos;LEG&apos;)), inMRMpolicyAREA.SPA_POLICY_RETURN[storageNoCnt].SPA_POLICY_AREA.SPA_LOB))));</Text>
....."
Could someone please enlighten me and tell me if they see anything wrong with this query ???
Eva
Back to top
View user's profile Send private message Send e-mail
JT
PostPosted: Wed Mar 09, 2005 4:26 pm    Post subject: Reply with quote

Padawan

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

What's the value of the index 'storageNoCnt'?

Basically, the 2437 error is saying you're assigning a value to Environment.Variables.Result with an index of storageNoCnt, but an occurence of Environment.Variables.Result with an index of storageNoCnt-1 doesn't exist.

Click here for details.
Back to top
View user's profile Send private message
JMB
PostPosted: Thu Mar 10, 2005 5:45 am    Post subject: Reply with quote

Apprentice

Joined: 01 Apr 2002
Posts: 29

storageNoCnt is set to one before this code is exicuted the first time, and incremented by one after each iteration.
Back to top
View user's profile Send private message
fschofer
PostPosted: Thu Mar 10, 2005 6:52 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
it seems to me you are getting NULLs back from your select.

Put a COALESCE statement arround your select, like

.... = COALESCE ( ...select... , storageNoCnt);

to see when the select fails.

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
EKhalil
PostPosted: Thu Mar 10, 2005 8:46 am    Post subject: Reply with quote

Voyager

Joined: 29 Apr 2003
Posts: 99
Location: Boston, MA

Yep you're absolutely right -nulls back !!!
I'll try coalesce, hopefully it will work.
THANKS
Back to top
View user's profile Send private message Send e-mail
EKhalil
PostPosted: Thu Mar 10, 2005 11:25 am    Post subject: Reply with quote

Voyager

Joined: 29 Apr 2003
Posts: 99
Location: Boston, MA

Well, here it goes remember that ITEM doesn't return a name/value pair it just returns a value
Here is the fix
SET Environment.Variables.Result[storageNoCnt].HUB_CD_CODE_NAME

So I will RTFM next time
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 » Database interaction issues in WBIMB 5.0 CSD 4 + Updates
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.