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 » ESQL CREATE PROCEDURE

Post new topic  Reply to topic
 ESQL CREATE PROCEDURE « View previous topic :: View next topic » 
Author Message
apsy
PostPosted: Wed Jul 14, 2004 6:48 am    Post subject: ESQL CREATE PROCEDURE Reply with quote

Novice

Joined: 10 Feb 2004
Posts: 24

I am trying to create a generic procedure, to which I want to pass in an Input root and Output Root. I want to modify/create an entirely new Output Root and return the new OutputRoot.

Is this possible.???

In the online help for create procedure , there is an example of passing in a Input Root. and returning back a Character variable, which then gets assigned to the Output Root.

Instead of passing back a Character variable, I want to manipulate he Output root inside my procedure and return it back.

How do I accomplish this?

I tried the following procedure declaration

CREATE PROCEDURE CreateResponse ( IN Environment REFERENCE , IN inroot REFERENCE , INOUT outroot REFERENCE)
BEGIN

set outroot.abc = "zzz";

END;

I pass in the following parameters:


CALL CreateResponse( Environment , InputRoot.XML , OutputRoot.XML );


It does not work.


I ran a trace nad it came back with the following error:


2004-07-13 13:51:32.040939 657 RecoverableException BIP2933E: A function or procedure was called but the value supplied for the 'outroot' parameter was not a reference to a reference variable but the definition of the function/procedure requires a reference to a reference variable.
Functions and procedures require references to reference variables to be supplied for OUT and INOUT reference parameters so that the resulting value can be assigned to its target.

Thanks
Apsy
Back to top
View user's profile Send private message
alexey
PostPosted: Wed Jul 14, 2004 7:12 am    Post subject: Reply with quote

Acolyte

Joined: 18 Dec 2003
Posts: 62
Location: Israel

Hi!
Change all parameters to IN, including outroot. It will work OK. Reference can not be changed itself, so it is always IN type. I've tryed to use such a procedure for filling headers - it did fill them, but I had a problem writing the message to a queue after it (no message body found error). So I suggest - do not change the headers in the procedure.

By the way you cannot set char. to "zzz", but do 'zzz'.

Alexey.
Back to top
View user's profile Send private message
CoolDude
PostPosted: Thu Jul 15, 2004 11:13 am    Post subject: Reply with quote

Apprentice

Joined: 17 Jan 2004
Posts: 39

I am not sure if i got the question correct but.

CREATE FIELD OutputRoot.XML

DELCARE outroot REFERENCE TO OuptutRoot.XML;
DECLARE inroot REFERENCE TO InputRoot.XML;

CALL convert (inroot, outroot);

CREATE PROCEDURE convert (IN inroot REFERENCE, INOUT outroot REFERENCE)
BEGIN


END;
_________________
Correct Me from Wrong . If i am correct Appreciate Me
Back to top
View user's profile Send private message
alexey
PostPosted: Sat Jul 17, 2004 2:10 pm    Post subject: Reply with quote

Acolyte

Joined: 18 Dec 2003
Posts: 62
Location: Israel

Hi!
Notice my previous post
alexey wrote:

Change all parameters to IN, including outroot

CoolDude wrote:

CREATE PROCEDURE convert (IN inroot REFERENCE, INOUT outroot REFERENCE)
BEGIN


END;

You have to define IN outroot parameter - otherwise you'll have an error described in the question (BIP2933E).

Alexey.
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 » ESQL CREATE PROCEDURE
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.