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

Error while trying to run sql stored procedure


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

New User


Joined: 23 Mar 2006
Posts: 17
Location: chennai

PostPosted: Thu May 25, 2006 6:01 pm
Reply with quote

Hi,

Am trying to run a sql stored procedures in DB2 from Asp or .Net front end.

I have created a store procedure as follows

CREATE PROCEDURE MM.INTERSP
(
IN INDATE DATE
,IN INTYPE VARCHAR(10)
)
RESULT SETS 1
LANGUAGE SQL
PROGRAM TYPE MAIN
READS SQL DATA
COLLID MMSPPACK
WLM ENVIRONMENT DSNAPP01
PARA1: BEGIN
DECLARE CUR1 CURSOR WITH RETURN FOR
SELECT Col1,
Col2,
Col3,
FROM MM.Table1
WHERE FROM_DATE <= INDATE
AND TO_DATE >= INDATE
AND TRANSACTIONTYPE = INTYPE;

OPEN CUR1;
END PARA1

The procedure has been created and am able to view the entry in SYSIBM.SYSROUTINES.
When a call is made to this procedure , I get the following error:

ERROR [42724] [IBM][DB2] SQL0444N Routine "INTERSP" (specific name "")
is implemented with code in library or path "", function ""
which cannot be accessed. Reason code: "". SQLSTATE=42724


Any clarification on topic is most welcome.
Back to top
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Thu May 25, 2006 6:45 pm
Reply with quote

For an SQL Stored Procedure, you cannot use PROGRAM TYPE Parm. So try with out it.
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top