Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problem with a stored procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Lkmi

New User


Joined: 04 Mar 2005
Posts: 53
Location: Newyork

PostPosted: Thu Jun 22, 2006 5:19 am    Post subject: Problem with a stored procedure
Reply with quote

I need to write a simple stored procedure in db2 which has a simple select.

so all i did was to declare a cursor with return option and i open the cursor after populatinhg the where clause with the input parameters send to the stored proc.

the stored proc is defined in the sysibm.sysprocedures.

when i call the stored proc through the java program, i get a sql code of -430. iam not able to find why it aBENDS,

what are the system tables in which definitions for the stored proc should be present apart from sysibm.sysprocedures?????
Back to top
View user's profile Send private message

anamikak

New User


Joined: 10 May 2006
Posts: 64
Location: Singapore

PostPosted: Sat Jun 24, 2006 1:47 am    Post subject:
Reply with quote

Firstly,he stored procedure definition would be stored in SYSIBM.SYSROUTINES and not in SYSIBM.SYSROUTINES, not sure if such a table called SYSIBM.SYSROUTINES exists. The In and out parameter definitions are stored in SYSIBM.SYSPARMS table.


If you are writing an external stored procedure with embedded SQL statments you need to crteate a package and mention the COLLECTION ID in the definition. If you are creating SQL PROCEDURE, then need not create a package.

Have you handled for SQL code +100 in your procedure?

have you opened and closed the cursors?

have you done the iterations for fetching until sqlcode 100?

can you publish the definition of your Stored procedure.(The create procedure statement).

Anamika
Back to top
View user's profile Send private message
Lkmi

New User


Joined: 04 Mar 2005
Posts: 53
Location: Newyork

PostPosted: Sat Jun 24, 2006 9:23 pm    Post subject:
Reply with quote

thanks for the response
i fouind what the problem was. the environment was not properly set up.
i fixed that. and one more mistake was i had the input fields as 10 level under a 01 level..which is wrong.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS web service from DB2 Triggers or... kiranprasad DB2 2 Wed Dec 20, 2017 11:10 am
No new posts Having a problem FTP'ng to the MF pahiker All Other Mainframe Topics 2 Fri Nov 10, 2017 8:20 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us