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

Error code 450 in stored procedure


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rashmirgowda

New User


Joined: 18 Jun 2008
Posts: 25
Location: india

PostPosted: Thu Dec 02, 2010 6:07 pm
Reply with quote

Hi,

i am using stored procedure in my main module. Main module is calling stored procedure1 and from stored procedure1 its calling stored procedure2.

Stored procedure2 is working fine and return the correct result to stored procedure1 with sqlcode of 450.


Main module --> Sp1 ---> Sp2

Please anyone guide me regarding the same.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Dec 02, 2010 6:14 pm
Reply with quote

What do you not understand from the SLQCODE -450 Description?
Back to top
View user's profile Send private message
rashmirgowda

New User


Joined: 18 Jun 2008
Posts: 25
Location: india

PostPosted: Thu Dec 02, 2010 6:38 pm
Reply with quote

i Understood that it was some access problem. Please let me know if you have any idea.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Dec 02, 2010 7:54 pm
Reply with quote

My DB2 manual lookup service:
Code:
-450   USER-DEFINED FUNCTION OR STORED PROCEDURE name, PARAMETER NUMBER 
       parmnum, OVERLAYED STORAGE BEYOND ITS DECLARED LENGTH.           
                                                                         
Explanation:  Upon return from a specific function name or a stored     
procedure name, DB2 has detected an overlay storage beyond a parameter's
declared length. The parameter number is specified for a stored procedure
or function. This is not permitted.                                     

It is not an access problem. I suggest you check passed parameters to the stored procedures. One or more may be longer than the length declared in the stored procedure.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 02, 2010 7:57 pm
Reply with quote

I hope you realize that SQLCODE you get was "- 450" and not "450 (without negative sign, as you post in your original post)".

- 450 means -- you've a mismatch in the parameter's declared length and to quote the manual:
Quote:
Upon return from a specific function name or a stored procedure name, DB2 has detected an overlay storage beyond a parameter's declared length. The parameter number is specified for a stored procedure or function. This is not permitted.
Back to top
View user's profile Send private message
rashmirgowda

New User


Joined: 18 Jun 2008
Posts: 25
Location: india

PostPosted: Thu Dec 02, 2010 8:17 pm
Reply with quote

Hi,

i have checked the parameter length. both are same.

Input to storeprocedure1 and output to the stored procedure2 are having same length.

please assist on the same.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Dec 02, 2010 8:18 pm
Reply with quote

You should be making a CALL to DSNTIAR to expand the SQLCA
WHEN EVER YOU ENCOUNTER A NEGATIVE SQLCODE
which will expand your SQLCA contents and provide you with neat bits of info.

Quote:
i have checked the parameter length. both are same.


well excuse me, DB2 must be wrong!
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Dec 02, 2010 8:32 pm
Reply with quote

rashmirgowda wrote:
Hi,

i have checked the parameter length. both are same.

Input to storeprocedure1 and output to the stored procedure2 are having same length.

please assist on the same.

But what perhaps is more interesting, what is the lenght of the actual data passed to stored procedure 1 from your application? Does it exceed the defined parameter lenghts?
Back to top
View user's profile Send private message
rashmirgowda

New User


Joined: 18 Jun 2008
Posts: 25
Location: india

PostPosted: Thu Dec 02, 2010 8:43 pm
Reply with quote

Hi,

From appliaction to stored procedure1 the length of input is 43, output is 66 and inout is 38.

for stored procedure the length of input is 46, output is 3 and inout is 38.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Dec 02, 2010 9:42 pm
Reply with quote

You are only looking at the definitions, but what are the length of the actual data supplied when you get the error?
Back to top
View user's profile Send private message
rashmirgowda

New User


Joined: 18 Jun 2008
Posts: 25
Location: india

PostPosted: Fri Dec 03, 2010 5:19 pm
Reply with quote

Hi,

The same length was used and got the error as 450.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Fri Dec 03, 2010 6:08 pm
Reply with quote

OK, if you can't provide further details on the error, this is the end of my help, sorry.

But do try to retrieve the SQLCA information, as dbz suggested above. It will at least tell you what parameter overflowed and in which procedure.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top