473,414 Members | 1,709 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,414 software developers and data experts.

PROCEDURE with one-character name, not returning RESULT SET

DB2/SUN 8.1.6

Using the client and CREATEing a PROCEDURE with a one-character name
and DECLAREing a CURSOR using WITH RETURN TO CLIENT, does not result in
a RESULT SET being shown.

CREATE PROCEDURE A() BEGIN \
DECLARE List CURSOR \
WITH RETURN TO CLIENT FOR VALUES(1); \
OPEN List; \
END

CREATE PROCEDURE AA() BEGIN \
DECLARE List CURSOR \
WITH RETURN TO CLIENT FOR VALUES(1); \
OPEN List; \
END

db2 => CALL A

Return Status = 0

db2 => CALL AA
Result set 1
--------------

1
-----------
1

1 record(s) selected.

Return Status = 0

DROP PROCEDURE A
DROP PROCEDURE AA

Is there a reason for this?

B.

Nov 12 '05 #1
2 1471
Brian Tkatch wrote:
DB2/SUN 8.1.6

Using the client and CREATEing a PROCEDURE with a one-character name
and DECLAREing a CURSOR using WITH RETURN TO CLIENT, does not result in
a RESULT SET being shown.

CREATE PROCEDURE A() BEGIN \
DECLARE List CURSOR \
WITH RETURN TO CLIENT FOR VALUES(1); \
OPEN List; \
END

CREATE PROCEDURE AA() BEGIN \
DECLARE List CURSOR \
WITH RETURN TO CLIENT FOR VALUES(1); \
OPEN List; \
END

db2 => CALL A

Return Status = 0

db2 => CALL AA
Result set 1
--------------

1
-----------
1

1 record(s) selected.

Return Status = 0

DROP PROCEDURE A
DROP PROCEDURE AA

Is there a reason for this?

B.

What happens when you do a CALL A()?
I get a -480 when I ommit the braces....with braces it works(?)
I suspect a CLP bug in the shorthand allowing calls to procs without
braces...

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2
CALL A() does work.
I suspect a CLP bug in the shorthand


Sounds plausable.

B.

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...
2
by: Jin | last post by:
Hello: I run one process that calls the following the store procedure and works fine. create PROCEDURE sp_GetHostSequenceNum AS BEGIN SELECT int_parameter_dbf + 1
3
by: aaj | last post by:
SQL SERVER 2000 Hi all This is my first attempt at writing a stored procedure. I have managed to get it working but its unlikely to be the best way of handling the problem. While writing it I...
4
by: SQLnewbie | last post by:
Wanted to know which among these options is better and why? Or if their could be scenarios where we could opt for one of these. a) flags passed from code to control the execution of queries...
18
by: Rhino | last post by:
I am having a problem with a nested SQL Procedure on DB2 V8.2.1 on Windows. This simple-looking proc is giving me this error message when I try to build it in the Development Center: ...
2
by: Eli | last post by:
Hi all We currently have a strange problem with calling a Stored Procedure (SQL Database) in our C# Project. The only error I get is "System error" which says a lot :) Background: We have...
3
by: Justin | last post by:
I am trying to query two tables with a stored procedure but I get the following error: "Procedure Details has no parameters and arguments were supplied." Here is my stored procedure as created...
3
by: Dj | last post by:
If you passed all of the fields as one group level when you rejester the SP you would only be able to use one CHAR field. Now here is the rub. If you are passing mix data, why not send it in the...
4
by: JohnnyDeep | last post by:
I am trying to create a store proc that contain a create index with the cluster option and I receive DB21034E The command was processed as an SQL statement because it was not a valid Command...
4
by: barmatt80 | last post by:
I am stumped on the error reporting with sql server. I was told i need to return @SQLCode(code showing if successful or not) and @ErrMsg(and the message returned). I am clueless on this. I...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.