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 OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


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