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

PROCEDURE with one-character name, not returning RESULT SET

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


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

P: n/a
CALL A() does work.
I suspect a CLP bug in the shorthand


Sounds plausable.

B.

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.