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 using SHARED variable

Post new topic  Reply to topic
 problem using SHARED variable « View previous topic :: View next topic » 
Author Message
Ravee Bhat
PostPosted: Tue Aug 12, 2008 5:12 am    Post subject: problem using SHARED variable Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

Hello All

am declaring one shared variable as below,
Code:
   DECLARE CacheQueueTable SHARED ROW;

CREATE COMPUTE MODULE FLOWNAME_HERE_Compute
...



This does not show any errors in the editor. However when I deploy this flow, I get a response back saying
Code:
BIP2402E: (, 3.26) : Syntax error : 'SHARED'.

The token caused a syntax error.


Not able to figure out whats missing?! Am I doing something wrong?
The toolkit is ver 6.0.0.1.

Thanks in advance
Ravee
Back to top
View user's profile Send private message Visit poster's website
vaibhav_vy
PostPosted: Tue Aug 12, 2008 9:56 pm    Post subject: Reply with quote

Apprentice

Joined: 04 Aug 2008
Posts: 28

You can't declare ROW variable like this. You have to use ROW constructor to initialize ROW variable.

Use syntax similar like,

DECLARE myVar SHARED ROW ROW('myVal' as element);

This declaration is allocwed only at module level or schema level.
Back to top
View user's profile Send private message
Ravee Bhat
PostPosted: Tue Aug 12, 2008 11:31 pm    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

Hello Vaibhav

Am not sure about that. And in my case I have nothing to initialize it with.

Correct me if I am wrong. In the .esql file if I declare it outside the module, that makes the variable, a module level. isn't it?

thanks,
Ravee
Back to top
View user's profile Send private message Visit poster's website
vaibhav_vy
PostPosted: Wed Aug 13, 2008 9:07 pm    Post subject: Reply with quote

Apprentice

Joined: 04 Aug 2008
Posts: 28

There is no way to declare the ROW variable without initializing it. And ROW constructor is one way to do that.

If you declare any variable outside any function/procedure but inside the module, its scope is MODULE level.

If you declare any variable outside module typically after SCEMA or PATH statement in a .esql file , its scope is SCHEMA level.
Back to top
View user's profile Send private message
Ravee Bhat
PostPosted: Wed Aug 13, 2008 11:35 pm    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

Thanks for the clarification about variable scope.

Some more details on the ROW,

I tried this on a separate sandbox on (a win xp m/c with broker runtime ver 6.1.0) where it works just fine, without initializing, without any issue like its mentioned in the samples gallery.
The same code won't work on our actual runtime (broker runtime 6.0.0.1 on solaris)

somehow am getting feeling that there must be some silly oversight from my side when I say both are 'same'!!!!

thanks
Ravee
Back to top
View user's profile Send private message Visit poster's website
vaibhav_vy
PostPosted: Thu Aug 14, 2008 12:51 am    Post subject: Reply with quote

Apprentice

Joined: 04 Aug 2008
Posts: 28

Its really weird. I am using Win XP / Broker Runtime 6.1 / Toolkit 6.1.0.2. But ROW variable declaration did not work without initializing it.

Lets hope some other members will throw more light on it.
Back to top
View user's profile Send private message
Ravee Bhat
PostPosted: Tue Aug 19, 2008 1:54 am    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

still no solution...

as i am talking to the support folks here, they have asked me to remove the CREATE SCHEMA clause from my ESQL code. This clause is not something i have written and i do not have any schema defined either (using the default schema). The CREATE SCHEMA appears only in the compiled message flow. If I am not wrong, having a schema for deployment of ESQL module is internal to the broker and flow deployment! right?!

Also did small modification to the code, declared the ROW variable at module level (w/o initializing) and now it complains about the keyword 'Row' itself! heh!

thanks
Ravee
Back to top
View user's profile Send private message Visit poster's website
Ravee Bhat
PostPosted: Thu Aug 21, 2008 10:53 pm    Post subject: update Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

After all the exercise (circus) found (from support folks) that though the broker toolkit is 6.x the broker runtime is 5.x Hence it would not take the SHARED variables declared. eh!!

thanks
Ravee
_________________
Lets go see The World.
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 » problem using SHARED variable
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.