|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
In-memory cache using Row Shared variables |
« View previous topic :: View next topic » |
Author |
Message
|
ghoshly |
Posted: Fri Mar 01, 2013 2:10 am Post subject: In-memory cache using Row Shared variables |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
I was following http://www.mqseries.net/phpBB/viewtopic.php?p=310506&sid=6354754b1c4a1eae694c0be4ab160e6b
I am trying to create a procedure which receives the table name as parameter and caches the data under a shared row variable of the same name.
while implementation I am failing while trying to pass the name as ROW variable as the parameter to the procedure.
Code: |
CREATE PROCEDURE InitialTableLoad(IN TableName ROW) BEGIN
SET TableName.valid VALUE = NULL;
CACHE : BEGIN ATOMIC -- beginning of atomic block. Processing is single threaded until the END; is reached
IF TableName.valid IS NULL THEN
SET TableName.StructureRow[] = EVAL('SELECT * FROM Database.'|| dataSourceName || '.' || usrSchema ||'.' || lookUpTable);
SET TableName.valid = TRUE;
END IF;
END CACHE;
END; |
Could you please help to identify the way I should pass the name?
Thanks a lot. |
|
Back to top |
|
 |
mgk |
Posted: Fri Mar 01, 2013 2:14 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Pass it as a REFERENCE.
Kind regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
ghoshly |
Posted: Fri Mar 01, 2013 2:38 am Post subject: Thanks .. Thanks.. a lot |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
I Salute!!!!
I don't know why I was feeling a reference should be used for message tree only, even though a ROW is a reference type.
Thanks a lot. |
|
Back to top |
|
 |
mgk |
Posted: Fri Mar 01, 2013 3:25 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
You can think of ROW as another name for a Tree. Everything you can do with a tree like the LocalEnvrionment, you can do with a ROW...
Kind regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|