Posted: Thu Sep 02, 2004 9:55 am Post subject: Access to LocalEnvironment in user functions
Novice
Joined: 31 Jul 2003 Posts: 16
WMQI 2.1/ Solaris/CSD5
Is there any we can use LocalEnvironment in user defined functions ?
For ex:
Code:
CREATE FUNCTION getX(data CHAR) RETURNS CHAR
BEGIN
DECLARE C CHAR;
set C = data;
SET OutputLocalEnvironment.Variables.func1.value = data;
RETURN C;
END;
The above fails when deployed & complains OutputLocalEnvironment is not in scope..... yeh wat ever & i understand it .
but still, is there any way around to use LocalEnvironment capabilities in functions ???
You have to pass in a reference to LocalEnvironment.
If you dig around on this forum a bit you will find examples of doing this with Environment and InputRoot and OutputRoot. _________________ I am *not* the model of the modern major general.
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
Take a look at this thread,
http://www.mqseries.net/phpBB2/viewtopic.php?t=10595 _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
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