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 » SHARED Variable and Database

Post new topic  Reply to topic
 SHARED Variable and Database « View previous topic :: View next topic » 
Author Message
brin_seb
PostPosted: Tue Jul 03, 2007 6:40 am    Post subject: SHARED Variable and Database Reply with quote

Novice

Joined: 10 Jun 2003
Posts: 24
Location: Luxembourg

I set shared variables. I set variables to different values depending environment.

Everything works fine except using Database.{host}
I receive this message : Unresolvable Database table reference "Database.{host}"
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Tue Jul 03, 2007 6:42 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What is the value of {host}?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
brin_seb
PostPosted: Wed Jul 04, 2007 1:00 am    Post subject: Reply with quote

Novice

Joined: 10 Jun 2003
Posts: 24
Location: Luxembourg

DECLARE environnement EXTERNAL CHARACTER;

DECLARE host SHARED CHARACTER;
DECLARE hostTransidiom SHARED CHARACTER;
DECLARE portTransidiom SHARED INTEGER;
DECLARE dbhost SHARED CHARACTER;
DECLARE dbsoxx SHARED CHARACTER;
DECLARE dbpfint SHARED CHARACTER;
DECLARE dbicms SHARED CHARACTER;

CREATE PROCEDURE EnvInit()
BEGIN
if (environnement = 'dev') then
SET host = 'ICMSPTB';
SET hostTransidiom = 'magda';
SET portTransidiom = 1208;
SET dbhost = 'Database.ICMSPTB';
SET dbsoxx = 'cdedev1';
SET dbpfint = 'cdedev1.cdepfint00';
SET dbicms = 'P6B3';
elseif (environnement = 'rec') then
SET host = 'ICMSPTB';
SET hostTransidiom = 'magda';
SET portTransidiom = 1208;
SET dbhost = 'Database.ICMSPTB';
SET dbsoxx = 'cderecette';
SET dbpfint = 'cderecette.cdepfint00';
SET dbicms = 'P6B3';
elseif (environnement = 'prod') then
SET host = 'ICMSPTA';
SET hostTransidiom = 'magda2';
SET portTransidiom = 1208;
SET dbhost = 'Database.ICMSPTA';
SET dbsoxx = 'ptprod51';
SET dbpfint = 'ptprod51.cdepfint00';
SET dbicms = 'ICMS';
end if;
END;
Back to top
View user's profile Send private message Visit poster's website
elvis_gn
PostPosted: Wed Jul 04, 2007 1:44 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi brin_seb,

First of all, why do you have different table names in dev, test and production ? I can understand database name being different, but tables also ??

I think External variables should have a default value set in esql.
Code:
DECLARE environnement EXTERNAL CHARACTER '<something>';

Did you take a trace and check what the broker made out of Database.{host}....most probably it was a non-existent table...

Regards.
Back to top
View user's profile Send private message Send e-mail
marcin.kasinski
PostPosted: Wed Jul 04, 2007 5:10 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

elvis_gn wrote:

I think External variables should have a default value set in esql.
Code:
DECLARE environnement EXTERNAL CHARACTER '<something>';


You can leave it blank here and initialize in bar during deployment.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
wbi_telecom
PostPosted: Thu Jul 05, 2007 9:19 am    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

Its very important that your EXTERNAL varible gets a value. if you initialize inside the node and then change it during the bar deployment the value you put during bar deployment takes precedence but if you do not set it to any default in the node and then forget to initialize it during bar deployment you are bound to get an error. So I would suggest have a default and overwrite it if you need to during deployment.

Cheers,
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 » SHARED Variable and Database
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.