If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Executing Stored Procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-02-03, 15:14
ansonee ansonee is offline
Registered User
 
Join Date: Feb 2002
Location: Minneapolis, MN
Posts: 253
Executing Stored Procedure

I'm executing a stored procedure and getting the
SQL0440N No authorized routine named
"AMROBI2.CREATEAIMCONNECTION" of type "PROCEDURE
" having compatible arguments was found.

The schema exists, the stored procedure exists, the user executing the procedure has execute permissions on the procedure and also has insert, update, delete rights on the table being accessed in the stored procedure. I'm sending in the correct number of input parameters.

I'm running Version 8, FixPak 3 on Windows.

Here's the stored procedure body (pretty basic):
CREATE PROCEDURE AMROBI2.CreateAIMConnection (IN decCHANNELSESSIONID DECIMAL(12,0),
IN strBUSINESSLINE VARCHAR(24),
IN strBRANCHID VARCHAR(24),
OUT decAIMCONNECTIONID DECIMAL(12,0))
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
LANGUAGE SQL
RESULT SETS 1
P1: BEGIN
INSERT INTO AMROBI2.AIMCONNECTION (ChannelSessionID, BusinessLine, BranchID, StartDateTime)
VALUES
(decCHANNELSESSIONID, strBUSINESSLINE, strBRANCHID, CURRENT TIMESTAMP);
SET decAIMCONNECTIONID = IDENTITY_VAL_LOCAL();
END P1

Here's how I'm calling it:

CALL AMROBI2.CREATEAIMCONNECTION (5, 'TEST', 'TEST');

What gives????
__________________
Anthony Robinson

"If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."
Reply With Quote
  #2 (permalink)  
Old 12-02-03, 15:44
ansonee ansonee is offline
Registered User
 
Join Date: Feb 2002
Location: Minneapolis, MN
Posts: 253
...a quick aside:

The proc runs fine if I run it through the Development Center.
__________________
Anthony Robinson

"If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."
Reply With Quote
  #3 (permalink)  
Old 12-02-03, 16:45
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
You have a fourth parameter for OUT

So you call should be

CALL AMROBI2.CREATEAIMCONNECTION (5, 'TEST', 'TEST',?);


HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #4 (permalink)  
Old 12-05-03, 10:39
ansonee ansonee is offline
Registered User
 
Join Date: Feb 2002
Location: Minneapolis, MN
Posts: 253
Cool...thanks!!!!

Appreciate the help...
__________________
Anthony Robinson

"If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On