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 » Multiple Variable Value return from Oracle Stored Procedure

Post new topic  Reply to topic
 Multiple Variable Value return from Oracle Stored Procedure « View previous topic :: View next topic » 
Author Message
keenlearner
PostPosted: Tue Jun 26, 2007 11:47 pm    Post subject: Multiple Variable Value return from Oracle Stored Procedure Reply with quote

Acolyte

Joined: 24 Aug 2006
Posts: 62

Hi Guyz
Envrionment : WinXP Service Pack 2
Message Broker 6.0
MQSeries 6.0
Database : Oracle 9i on Unix
ODBC : MQSeries DataDirect 5.0 32 Bit Oracle

I am calling an Oracle Stored Procedure from esql code which returns multiple out parameters.
The problem which i am facing is all the output parametes have the same value.
For example if there are two output parameters out1 and out2. the value of out1 and out 2 are same.
Though procedure is running fine when executed in Oracle Plus.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Tue Jun 26, 2007 11:54 pm    Post subject: Re: Multiple Variable Value return from Oracle Stored Proced Reply with quote

Sentinel

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

Hi,

Can you show ESQL code and sample output from Oracle Plus and ESQL?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
keenlearner
PostPosted: Wed Jun 27, 2007 12:39 am    Post subject: Reply with quote

Acolyte

Joined: 24 Aug 2006
Posts: 62

Hi Marcin

the ESQL CODE
Code:

BROKER SCHEMA BROKER_SCHEMA

CREATE PROCEDURE CALL_TEST_PROC_CROSS_REF( IN in_var1 CHARACTER,
                                 INOUT out_var1 CHARACTER,
                                 INOUT out_var2 CHARACTER)                                 
LANGUAGE DATABASE
EXTERNAL NAME "XXINT.Evnironment_Population_PRC";

CREATE COMPUTE MODULE MulitpleValue_Return_MF_Multiple_Values
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
      CALL CopyMessageHeaders();
      DECLARE in_var1  CHARACTER;
      DECLARE out_var1 CHARACTER '';
      DECLARE out_var2 CHARACTER '';                     
      SET in_var1='test';      
      CALL CALL_TEST_PROC_CROSS_REF(in_var1, out_var1,out_var2);
      
      SET OutputRoot.XML.Results.Value1   = out_var1;
      SET OutputRoot.XML.Results.Value2   = out_var2;
      
      RETURN TRUE;
   END;

   CREATE PROCEDURE CopyMessageHeaders() BEGIN
      DECLARE I INTEGER 1;
      DECLARE J INTEGER;
      SET J = CARDINALITY(InputRoot.*[]);
      WHILE I < J DO
         SET OutputRoot.*[I] = InputRoot.*[I];
         SET I = I + 1;
      END WHILE;
   END;
END MODULE;


Sample Out put From Oracle will be
out_var1=First Param
out_var2=Success;

But from Esql i m getting

out_var1=First Param
out_var2=First Param
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Wed Jun 27, 2007 1:52 am    Post subject: Reply with quote

Sentinel

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

Do you use "test" as input parameter in both Oracle Plus and ESQL ?

Are you 100% sure that database output in both examples is "First Param" and "Success". Can you debug database ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
keenlearner
PostPosted: Wed Jun 27, 2007 2:41 am    Post subject: Reply with quote

Acolyte

Joined: 24 Aug 2006
Posts: 62

Hi Marcin
i am test the procedure from TOAD. You can get the results from there as dbms output put line .... It shows the values of out_var1 as First Param and second as Success,
Bur ESQK is not showing it/
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jun 27, 2007 3:21 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are you using MB 6.0.0.0 or 6.0.0.3?

What is the SQL definition of the procedure in Oracle?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
keenlearner
PostPosted: Wed Jun 27, 2007 4:18 am    Post subject: Reply with quote

Acolyte

Joined: 24 Aug 2006
Posts: 62

jeff,

I am using Boker version 6.0.0.0

Code:

CREATE OR REPLACE PROCEDURE XXINT.Evnironment_Population_PRC (
  in_var1  IN  VARCHAR2,
  out_var1 OUT VARCHAR2,
  out_var2 OUT VARCHAR2) AS
BEGIN

 out_var1 := 'First Param';
 out_var2 := 'Success';

END Evnironment_Population_PRC;
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jun 27, 2007 4:20 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You should apply FP3 or FP4 to go to 6.0.0.3 or 6.0.0.4.

It might help. It's also just the right thing to do.
_________________
I am *not* the model of the modern major general.
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 » Multiple Variable Value return from Oracle Stored 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.