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
 
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm

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