473,545 Members | 2,042 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1478
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
22103
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 application server can talk to the database. I've determined the failure occurs when the the following statement is executed: cstmt.execute(); (due...
2
4023
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
4009
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 found some things that I don't understand so if any one could shed any light it would be much appreciated. I have posted these at the end.
4
1446
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 within a stored procedure i.e. - where queries within a single stored procedure are controlled by flags passed to them. OR b) Break individual...
18
7605
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: RHINO.CALLED01: 18: SQL0104N An unexpected token "<cursor declaration>" was found following "". Expected tokens may include: "<SQL statement>". LINE...
2
3318
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 several stored procedures to Insert and update datas in our SQL database. Some stored procedures are smaller (insert datas in only one table) and some...
3
411
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 by Visual Studio: ALTER PROCEDURE dbo.Details AS SET NOCOUNT ON;
3
1890
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 smallest network transaction possible. Also why not have DB2 validate each parameter. This should be a must so the SP knows that data type has...
4
3730
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 Line Processor command. During SQL processing it returned: SQL0623N A clustering index already exists on table "PGIR.TF_RRCE". LINE NUMBER=35. ...
4
5069
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 wrote this procedure: ALTER PROCEDURE . @Emp_SSN int, @Annual_Forward decimal(10,2),
0
7478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7668
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7437
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3466
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.