473,379 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Stored Procedure problem in DB2 for OS/390 V6

I am getting an sqlcode of -927 when I execute SQL within a COBOL stored
procedure in DB2 OS/390 Version 6 on OS/390. I have looked at the error
message for that condition and tried everything I could think of to resolve
the problem but nothing works.

The stored proc is running in the DB2 Stored Procedures Address Space and
both the client and the proc have DSNELI linked into their load modules. The
client and proc are running in TSO via the RUN command which I am issuing in
JCL. I've also tried executing the client in foreground mode via the Run
panel in DB2I but it fails on the same -927.

The JCL jobs I am using to prepare the proc and the client were given to me
by someone who had great success with them on his own stored procs and I get
0 return codes from all phases of the preparation cycle. The client starts
fine and gets into the stored proc fine but it just refuses to do its SQL.

I've compared my proc's definition in SYSIBM.SYSROUTINES with the
definitions of my colleague's procs and they are the same (except for the
name of course). Unfortunately, he is out of town and I haven't been able to
connect with him to get his help on this problem.

If anyone can suggest a strategy for getting past this problem, I would be
very grateful.

Rhino
Nov 12 '05 #1
2 4262
DSNELI is the language interface to use for programs executing under the
DSN established environment. That will not be the case for a stored
procedure. The Application Programming and SQL Guide (V8) states that
DSNALI or DSNRLI should be used, depending on the stored procedure's
execution environment.

Phil Sherman

Rhino wrote:
I am getting an sqlcode of -927 when I execute SQL within a COBOL stored
procedure in DB2 OS/390 Version 6 on OS/390. I have looked at the error
message for that condition and tried everything I could think of to resolve
the problem but nothing works.

The stored proc is running in the DB2 Stored Procedures Address Space and
both the client and the proc have DSNELI linked into their load modules. The
client and proc are running in TSO via the RUN command which I am issuing in
JCL. I've also tried executing the client in foreground mode via the Run
panel in DB2I but it fails on the same -927.

The JCL jobs I am using to prepare the proc and the client were given to me
by someone who had great success with them on his own stored procs and I get
0 return codes from all phases of the preparation cycle. The client starts
fine and gets into the stored proc fine but it just refuses to do its SQL.

I've compared my proc's definition in SYSIBM.SYSROUTINES with the
definitions of my colleague's procs and they are the same (except for the
name of course). Unfortunately, he is out of town and I haven't been able to
connect with him to get his help on this problem.

If anyone can suggest a strategy for getting past this problem, I would be
very grateful.

Rhino


Nov 12 '05 #2
Thank you VERY VERY much Philip!

That was exactly the problem; as soon as I changed it to DSNALI, the program
starting working fine from the DB2 Stored Procedures Address Space. Clearly,
the JCL I was given was not quite 100% right after all....

Rhino

"Philip Sherman" <ps******@ameritech.net> wrote in message
news:Um****************@newssvr17.news.prodigy.com ...
DSNELI is the language interface to use for programs executing under the
DSN established environment. That will not be the case for a stored
procedure. The Application Programming and SQL Guide (V8) states that
DSNALI or DSNRLI should be used, depending on the stored procedure's
execution environment.

Phil Sherman

Rhino wrote:
I am getting an sqlcode of -927 when I execute SQL within a COBOL stored
procedure in DB2 OS/390 Version 6 on OS/390. I have looked at the error
message for that condition and tried everything I could think of to resolve the problem but nothing works.

The stored proc is running in the DB2 Stored Procedures Address Space and both the client and the proc have DSNELI linked into their load modules. The client and proc are running in TSO via the RUN command which I am issuing in JCL. I've also tried executing the client in foreground mode via the Run
panel in DB2I but it fails on the same -927.

The JCL jobs I am using to prepare the proc and the client were given to me by someone who had great success with them on his own stored procs and I get 0 return codes from all phases of the preparation cycle. The client starts fine and gets into the stored proc fine but it just refuses to do its SQL.
I've compared my proc's definition in SYSIBM.SYSROUTINES with the
definitions of my colleague's procs and they are the same (except for the name of course). Unfortunately, he is out of town and I haven't been able to connect with him to get his help on this problem.

If anyone can suggest a strategy for getting past this problem, I would be very grateful.

Rhino

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
3
by: Rhino | last post by:
I've spent the last couple of hours trying to figure out how to debug a Java stored procedure and am just going in circles. The last straw came when I got "Cannot open input stream for default"...
4
by: Rhino | last post by:
Is it possible for a Java Stored Procedure in DB2 V7.2 (Windows) to pass a Throwable back to the calling program as an OUT parameter? If yes, what datatype should I use when registering the...
8
by: Thomasb | last post by:
With a background in MS SQL Server programming I'm used to temporary tables. Have just started to work with DB2 ver 7 on z/OS and stumbled into the concept of GLOBAL TEMPORARY TABLE. I have...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
0
by: Amber | last post by:
Stored procedures are faster and more efficient than in-line SQL statements. In this article we will look at two SQL Server stored procedures; one using an input parameter and one not, and see how...
3
by: kd | last post by:
Hi All, How to debug a stored procedure? Thanks, kd
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
2
by: jed | last post by:
I have created this example in sqlexpress ALTER PROCEDURE . @annualtax FLOAT AS BEGIN SELECT begin1,end1,deductedamount,pecentageextra FROM tax
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.