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
 

 

problem converting sub program to a stored procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: problem converting sub program to a stored procedure
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10219
Location: italy

PostPosted: Mon Feb 06, 2012 2:07 pm    Post subject: Reply to: problem converting sub program to a stored procedu
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    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10219
Location: italy

PostPosted: Tue Feb 07, 2012 6:13 pm    Post subject: Reply to: problem converting sub program to a stored procedu
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: 642
Location: Whitby, ON, Canada

PostPosted: Tue Feb 07, 2012 6:50 pm    Post subject: Re: Reply to: problem converting sub program to a stored pro
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    Post subject:
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: 642
Location: Whitby, ON, Canada

PostPosted: Tue Feb 07, 2012 7:16 pm    Post subject:
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    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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 11 Wed Feb 22, 2017 5:56 pm
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm


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