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

problem converting sub program to a stored procedure


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

New User


Joined: 05 Nov 2005
Posts: 28

PostPosted: Mon Feb 06, 2012 1:50 pm
Reply with quote

I had a cobol sub program with a lot of SQL select calls & I converted to stored procedure.

I compiled the stored proc with DSNRLI & created the procedure.

When I am running the program to call stored procedure, i am getting error without any explicit message.

Please help.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Feb 06, 2012 2:07 pm
Reply with quote

Quote:
i am getting error without any explicit message.


don' t You think that without telling anything more Your chances of getting help are pretty slim ?
Back to top
View user's profile Send private message
kanha

New User


Joined: 05 Nov 2005
Posts: 28

PostPosted: Mon Feb 06, 2012 3:57 pm
Reply with quote

you are rite.

Getting below error message which doesn't help much & it's common for most abends.

Error message: COMPLETION CODE USER = 0001 REASON CODE = 00000000

I used displays before/ after the stored procedure call & shows the INOUT & OUT parameters don't change which means that stored procedure is not called properly. Beyond this, I am helpless.

My create prcedure DDL is as below.

CREATE PROCEDURE RR6520DP
( INOUT WS_USER1 VARCHAR(200)
, INOUT WS_USER2 VARCHAR(400)
, INOUT WS_USER3 VARCHAR(750)
)
RESULT SETS 0
EXTERNAL NAME SP650020
LANGUAGE COBOL
PARAMETER STYLE GENERAL
WLM ENVIRONMENT DEVAPPROC
COLLID DB2DEV1
PROGRAM TYPE SUB
STAY RESIDENT YES
COMMIT ON RETURN NO ;
GRANT EXECUTE ON PROCEDURE RR6520DP TO PUBLIC ;
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Feb 06, 2012 8:06 pm
Reply with quote

is this going to be a long, drawn-out thread, or what?
Back to top
View user's profile Send private message
kanha

New User


Joined: 05 Nov 2005
Posts: 28

PostPosted: Tue Feb 07, 2012 5:09 pm
Reply with quote

I'm sorry; didn't get it
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Feb 07, 2012 6:13 pm
Reply with quote

Quote:
is this going to be a long, drawn-out thread, or what?

do we need to pull out information the same way a dentist pulls out a tooth ? icon_cool.gif
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Tue Feb 07, 2012 6:50 pm
Reply with quote

enrico-sorichetti wrote:
Quote:
is this going to be a long, drawn-out thread, or what?

do we need to pull out information the same way a dentist pulls out a tooth ? icon_cool.gif
And some of the dentists on this list don't like to use Novacaine either. icon_evil.gif
Back to top
View user's profile Send private message
kanha

New User


Joined: 05 Nov 2005
Posts: 28

PostPosted: Tue Feb 07, 2012 6:59 pm
Reply with quote

Even then, I don't have much to offer :-)

I already said the job abends without giving an explicit message that will help me identify the problem.

What I need is any possible reasons why this could occur when we call a stored procedure.

Else a good help wud be to direct me to a document that lists all the neccasry things that are to be taken care while converting subroutines to stored procedure.

Or even, a document on how to debug a stored procedure without any specialized tool could help.

I am saying I don't have anything not even an error message. So, looking for anything that can help.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Tue Feb 07, 2012 7:16 pm
Reply with quote

There probably is an error message, but you may not be looking in the right place.

Stored procedures run in their own address space, so the place to start is in the syslog associated with the address space. If you are an application programmer, you may not have access to it, so you will need to request the help of your DBA and/or DB2 systems programmer.
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Using API Gateway from CICS program CICS 0
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top