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 » Not able to pass array to oracle stored proc from WMB8

Post new topic  Reply to topic
 Not able to pass array to oracle stored proc from WMB8 « View previous topic :: View next topic » 
Author Message
KaviKM
PostPosted: Tue Dec 10, 2013 10:25 pm    Post subject: Not able to pass array to oracle stored proc from WMB8 Reply with quote

Novice

Joined: 10 Dec 2013
Posts: 19
Location: United Kingdom

Hi All,
I need to pass array to oracle stored proc in esql. I am using WMB8.

CREATE PROCEDURE CUST_UPD(IN sArray REFERENCE, IN StatusCode CHARACTER, OUT RespCode INTEGER, OUT pRespDesc CHARACTER)
LANGUAGE DATABASE EXTERNAL NAME "CUST_UPD";


There are 2 calls to this stored proc.
1:
CALL CUST_UPD(NULL, char_Stat, int_respCode, char_respDesc);

2:
CALL CUST_UPD(Environment.Variables.DATA.ID_NO[], char_Stat, int_respCode, char_respDesc);

I am not able to pass NULL value in 1st or the array in 2nd call to stored.

In 2nd call below error is received
A non scalar parameter passed to Stored Procedure

Note: The stored procedure can accept NULL values.
Any help is appreciated.
Back to top
View user's profile Send private message
Esa
PostPosted: Tue Dec 10, 2013 10:55 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

An array is not a REFERENCE. But you probably cannot pass a reference either. It's not a scalar variable. Serialize the values into a CHAR variable?

NULL is not a REFERENCE.
Back to top
View user's profile Send private message
KaviKM
PostPosted: Tue Dec 10, 2013 11:14 pm    Post subject: Not able to pass array to oracle stored proc from WMB8 Reply with quote

Novice

Joined: 10 Dec 2013
Posts: 19
Location: United Kingdom

[quote="Esa"An array is not a REFERENCE. But you probably cannot pass a reference either. It's not a scalar variable. Serialize the values into a CHAR variable? ]

NULL is not a REFERENCE.[/quote]

CHAR variable but the array is of Numbers. Do we need to pass an array of CHAR values instead of INT values?
also can't we pass NULL values to stored procedure?
Back to top
View user's profile Send private message
KaviKM
PostPosted: Tue Dec 10, 2013 11:30 pm    Post subject: Not able to pass array to oracle stored proc from WMB8 Reply with quote

Novice

Joined: 10 Dec 2013
Posts: 19
Location: United Kingdom

What should be the declaration for the Array variable if not Reference.
I tried ROW but was not able to get the result.

CREATE PROCEDURE CUST_UPD(IN sArray REFERENCE, IN StatusCode CHARACTER, OUT RespCode INTEGER, OUT pRespDesc CHARACTER)
LANGUAGE DATABASE EXTERNAL NAME "CUST_UPD";
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Dec 11, 2013 12:58 am    Post subject: Re: Not able to pass array to oracle stored proc from WMB8 Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

KaviKM wrote:
What should be the declaration for the Array variable if not Reference.


CHAR
Back to top
View user's profile Send private message
KaviKM
PostPosted: Wed Dec 11, 2013 1:18 am    Post subject: Not able to pass array to oracle stored proc from WMB8 Reply with quote

Novice

Joined: 10 Dec 2013
Posts: 19
Location: United Kingdom

So the procedure should have below definition

CREATE PROCEDURE CUST_UPD(IN sArray CHARACTER, IN StatusCode CHARACTER, OUT RespCode INTEGER, OUT pRespDesc CHARACTER)
LANGUAGE DATABASE EXTERNAL NAME "CUST_UPD";

The Call to the stored proc will be as below?
CALL CUST_UPD(Environment.Variables.DATA.ID_NO[], char_Stat, int_respCode, char_respDesc);

I didn't get below part though.
"Serialize the values into a CHAR variable"
Back to top
View user's profile Send private message
KaviKM
PostPosted: Thu Dec 12, 2013 2:02 am    Post subject: Not able to pass array to oracle stored proc from WMB8 Reply with quote

Novice

Joined: 10 Dec 2013
Posts: 19
Location: United Kingdom

Hi

I will utilize Java since WMB 8 does not support this type of call to oracle stored proc.
Thanks for your help.
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 » Not able to pass array to oracle stored proc from WMB8
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.