IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SQLCODE -440 while calling a Stored Procedure


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maragatham

New User


Joined: 23 Dec 2008
Posts: 5
Location: Bangalore

PostPosted: Wed Jun 02, 2010 2:57 pm
Reply with quote

Hi There,

I tried searching the FAQ's for SQLCODE -440 with no luck and hence posting the query.

I am facing problems while binding a calling module. The error is thrown at the CALL statement for SP(SQLSTATE 42884).
My SP is defined in the database and has been already promoted.

However, when I try accessing the SP via Java it throws me a SQLCODE -430 with SQLSTATE 38503.

I have gone through my IO parameters and they are all in sync.

Can someone shed light?
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Wed Jun 02, 2010 3:46 pm
Reply with quote

Check whether your SP is in STOP state; if yes, restart it, execute it again and find where it is abending abnormally.
Back to top
View user's profile Send private message
maragatham

New User


Joined: 23 Dec 2008
Posts: 5
Location: Bangalore

PostPosted: Wed Jun 02, 2010 4:26 pm
Reply with quote

Thanks Ashimer,
But do we have any catalog\system tables on DB2 where I can check on the structure of my SP? This is to cross check if my SP is properly defined.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Wed Jun 02, 2010 4:43 pm
Reply with quote

SYSIBM.SYSROUTINES
Back to top
View user's profile Send private message
maragatham

New User


Joined: 23 Dec 2008
Posts: 5
Location: Bangalore

PostPosted: Wed Jun 02, 2010 5:12 pm
Reply with quote

Hi,
I have checked sysroutines to see no anomaly.
I am now issuing a DB2 command
-Display Procedure schema.procname from DB2 commands to know the status of my SP.
And it abends with DSN9001I keyword 'schema.procname' is invalid.

It is the same error with -START PROCEDURE as well.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Wed Jun 02, 2010 7:01 pm
Reply with quote

Code:

-DISPLAY PROCEDURE (SCHEMA.PROCNAME)
Back to top
View user's profile Send private message
maragatham

New User


Joined: 23 Dec 2008
Posts: 5
Location: Bangalore

PostPosted: Wed Jun 02, 2010 7:24 pm
Reply with quote

sorry unable to view the code.
Also, My DBA has now confirmed that the SPs are not in STOP mode.

Any idea on the error?
Back to top
View user's profile Send private message
sumit_tumba

New User


Joined: 13 Feb 2007
Posts: 4
Location: kolkata

PostPosted: Thu Jun 03, 2010 12:12 am
Reply with quote

check in the catalogue table.
May be you are passing wrong scema name while calling the stored proc.
Back to top
View user's profile Send private message
Ragav86

New User


Joined: 27 Jan 2010
Posts: 37
Location: chennai

PostPosted: Fri Jun 04, 2010 11:40 am
Reply with quote

Code:

-440   NO routine-type BY THE NAME routine-name HAVING COMPATIBLE         
       ARGUMENTS WAS FOUND IN THE CURRENT PATH                           
                                                                         
Explanation:                                                             
                                                                         
This occurs in a reference to routine (stored procedure or function)     
routine-name, when DB2 cannot find a function or stored procedure it can 
use to implement the reference. There are several reasons why this could 
occur.                                                                   
                                                                         
o   routine-name was either incorrectly specified or does not exist in the
    database.                                                             
                                                                         
o   A qualified reference was made, and the qualifier was incorrectly     
    spelled.                                                             
o   A user's SQL path does not contain the schema to which the desired     
    function belongs, and an unqualified reference was used.               
                                                                           
o   The wrong number of arguments were included.                           
                                                                           
o   For functions, the data types of one or more of the arguments is       
    incorrect.                                                             
                                                                           


have you checked the parameters specified in the call statement..
and its data types..?
if your procedure was stopped -471 reason code 2 will come..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts calling a JCl inside a JCL JCL & VSAM 3
No new posts Calling IEHPROGM from REXX CLIST & REXX 7
Search our Forums:

Back to Top