Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Error while trying to run sql stored procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Error while trying to run sql stored procedure
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    Post subject:
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    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 Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am
No new posts DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us