By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,466 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,466 IT Pros & Developers. It's quick & easy.

Stored Procedure problem in DB2 for OS/390 V6

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.