I am calling the exact same stored procedure called myprocedure from 2
different boxes from the CLP, but I'm experiencing different behaviors
between them. After I was unable to get
any support from IBM due to V7.1 being no longer supported, I figure
someone here might
be able to help.
Is DB2 V7 more forgiving in the way I can call my stored procedure ? If
it's defined with CHARACTER as incoming parameter, am I not required to
put any quotes around it ?
Or does it have something to do with my environment (Dynix vs Linux) ?
CREATE PROCEDURE myprocedure (
IN
v_in_proc_id CHAR(6),
OUT
RETURN_VAL INTEGER
)
LANGUAGE SQL
MODIFIES SQL DATA
BEGIN
..
..
END
BOX1
---------
SEQUENT dynix/ptx 4.5.3 (supposedly equivalent to NUMA Q)
DB2 Client V7.1
--->db2 "call myprocedure (xxx,?)"
RETURN_VAL: 1
"myprocedur e" RETURN_STATUS: "1"
BOX2
---------
Linux SUSE 9
DB2 Client V8.2
----->db2 "call myprocedure (xxx,?)"
SQL0408N A value is not compatible with the data type of its
assignment
target. Target name is "V_IN_PROC_ ID". SQLSTATE=42821
---------
If I put a single quote around the variable, then it will run in both
the way
it's supposed to. I need to find out why calling a procedure without
quotes was allowed in BOX1. Has anyone run into this in the old days ;)
?
Thanks!!
Nick 3 4318
<ha*********@gm ail.com> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.com.. . I am calling the exact same stored procedure called myprocedure from 2 different boxes from the CLP, but I'm experiencing different behaviors between them. After I was unable to get any support from IBM due to V7.1 being no longer supported, I figure someone here might be able to help.
Is DB2 V7 more forgiving in the way I can call my stored procedure ? If it's defined with CHARACTER as incoming parameter, am I not required to put any quotes around it ? Or does it have something to do with my environment (Dynix vs Linux) ?
CREATE PROCEDURE myprocedure ( IN v_in_proc_id CHAR(6), OUT RETURN_VAL INTEGER ) LANGUAGE SQL MODIFIES SQL DATA BEGIN . . END
BOX1 --------- SEQUENT dynix/ptx 4.5.3 (supposedly equivalent to NUMA Q) DB2 Client V7.1
--->db2 "call myprocedure (xxx,?)" RETURN_VAL: 1
"myprocedur e" RETURN_STATUS: "1" BOX2 --------- Linux SUSE 9 DB2 Client V8.2
----->db2 "call myprocedure (xxx,?)" SQL0408N A value is not compatible with the data type of its assignment target. Target name is "V_IN_PROC_ ID". SQLSTATE=42821 ---------
If I put a single quote around the variable, then it will run in both the way it's supposed to. I need to find out why calling a procedure without quotes was allowed in BOX1. Has anyone run into this in the old days ;) ?
Thanks!!
Nick
Using a DB2 version 8 client with a DB2 version 7 server is not supported.
Even though some things may work OK, there are some things that do not work.
However, it might help if you could update your DB2 Version 7 server with
the latest version 7 fixpack, so that you have a version of DB2 server that
was released after the Version 8 client was released.. ha*********@gma il.com wrote: I am calling the exact same stored procedure called myprocedure from 2 different boxes from the CLP, but I'm experiencing different behaviors between them. After I was unable to get any support from IBM due to V7.1 being no longer supported, I figure someone here might be able to help.
Is DB2 V7 more forgiving in the way I can call my stored procedure ? If it's defined with CHARACTER as incoming parameter, am I not required to put any quotes around it ? Or does it have something to do with my environment (Dynix vs Linux) ?
CREATE PROCEDURE myprocedure ( IN v_in_proc_id CHAR(6), OUT RETURN_VAL INTEGER ) LANGUAGE SQL MODIFIES SQL DATA BEGIN . . END
BOX1 --------- SEQUENT dynix/ptx 4.5.3 (supposedly equivalent to NUMA Q) DB2 Client V7.1
--->db2 "call myprocedure (xxx,?)" RETURN_VAL: 1
"myprocedur e" RETURN_STATUS: "1" BOX2 --------- Linux SUSE 9 DB2 Client V8.2
----->db2 "call myprocedure (xxx,?)" SQL0408N A value is not compatible with the data type of its assignment target. Target name is "V_IN_PROC_ ID". SQLSTATE=42821 ---------
If I put a single quote around the variable, then it will run in both the way it's supposed to. I need to find out why calling a procedure without quotes was allowed in BOX1. Has anyone run into this in the old days ;) ?
In V7 CALL was an API call outside of SQL and CLP hid it from the user.
Unfortunately the quotes for strings were not enforced. That was a bug.
In V8 CALL is a regular SQL statement and hence the SQL rules for
literals must be observed.
In return CALL can now be dynamically prepared, allows expressions and
even subqueries in the parameter list:
SET txt = 'CALL P((SELECT COUNT(*) FROM T), ?, ? * 10)';
PREPARE STMT FROM TXT;
EXECUTE STMT USING x, y;
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
IOD Conference http://www.ibm.com/software/data/ond...ness/conf2006/
HI Serge,
Thank you very much for the information. Is there any
document that I can refer to regarding this V7 bug or any links
that I can refer to ? I would love to do some more reading on this.
I tried looking up in the V7 documentation without success.
Thank you!
Nick
Serge Rielau wrote: ha*********@gma il.com wrote: I am calling the exact same stored procedure called myprocedure from 2 different boxes from the CLP, but I'm experiencing different behaviors between them. After I was unable to get any support from IBM due to V7.1 being no longer supported, I figure someone here might be able to help.
Is DB2 V7 more forgiving in the way I can call my stored procedure ? If it's defined with CHARACTER as incoming parameter, am I not required to put any quotes around it ? Or does it have something to do with my environment (Dynix vs Linux) ?
CREATE PROCEDURE myprocedure ( IN v_in_proc_id CHAR(6), OUT RETURN_VAL INTEGER ) LANGUAGE SQL MODIFIES SQL DATA BEGIN . . END
BOX1 --------- SEQUENT dynix/ptx 4.5.3 (supposedly equivalent to NUMA Q) DB2 Client V7.1
--->db2 "call myprocedure (xxx,?)" RETURN_VAL: 1
"myprocedur e" RETURN_STATUS: "1" BOX2 --------- Linux SUSE 9 DB2 Client V8.2
----->db2 "call myprocedure (xxx,?)" SQL0408N A value is not compatible with the data type of its assignment target. Target name is "V_IN_PROC_ ID". SQLSTATE=42821 ---------
If I put a single quote around the variable, then it will run in both the way it's supposed to. I need to find out why calling a procedure without quotes was allowed in BOX1. Has anyone run into this in the old days ;) ? In V7 CALL was an API call outside of SQL and CLP hid it from the user. Unfortunately the quotes for strings were not enforced. That was a bug. In V8 CALL is a regular SQL statement and hence the SQL rules for literals must be observed. In return CALL can now be dynamically prepared, allows expressions and even subqueries in the parameter list: SET txt = 'CALL P((SELECT COUNT(*) FROM T), ?, ? * 10)'; PREPARE STMT FROM TXT; EXECUTE STMT USING x, y;
Cheers Serge
-- Serge Rielau DB2 Solutions Development IBM Toronto Lab
IOD Conference http://www.ibm.com/software/data/ond...ness/conf2006/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 to the failure of println statements
placed afterwards). I get the following error after trying to...
|
by: Neil |
last post by:
Please could someone explain to me the differences between a stored
procedure and a view.
The reason for this question is I have two almost identical ASP pages.
Both get the same results but one uses a stored procedure and one uses
a view. If the query returns no results the 'view page' generates
errors and therefore I have to check for BOF and EOF, whereas the
'stored procedure page' does not generate errors and instead would
appear to...
|
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 Throwable as an OUT
parameter and what datatype should I use in the CREATE PROCEDURE and DROP
PROCEDURE statements?
Here's what I tried:
- the method signature for the stored procedure included: Throwable
throwable
|
by: Viator |
last post by:
Hi All;
I am working on project; where I need to call a DB2 stored procedure
(also to be written in the project) which will update/insert some
records in the database. The number of rows to be intserted are decide
at runtime and there is a constraint that the procedure should be
called only once.
So the questino is...
Can we pass a java array or a Collection using JDBC to DB2? If yes how
|
by: Dino L. |
last post by:
How can I run stored procedure (MSSQL) ?
| |
by: Peter |
last post by:
Hi, there
I have created an stored procedure using the DDL below for my MS Access
Database and no error occurs. Also it can create an stored procedure if I
changed the parameter from "" to ""@zSampleName".
OleDbcmd.CommandText = _
"CREATE PROCEDURE udpGetSampleIDByName" & vbCrLf & _
"( VarChar(64))" & vbCrLf & _
"AS" & vbCrLf & _
|
by: mooreit |
last post by:
The purpose for my questions is accessing these technologies from
applications. I develop both applications and databases. Working with
Microsoft C#.NET and Microsoft SQL Server 2000 Production and 2005 Test
Environments.
What is the purpose of a view if I can just copy the vode from a view
and put it into a stored procedure?
Should I be accessing views from stored procedures?
|
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
|
by: SOI_0152 |
last post by:
Hi all!
Happy New Year 2008. Il hope it will bring you love and happyness
I'm new on this forum.
I wrote a stored procedure on mainframe using DB2 7.1.1 and IBM language c.
Everything works fine.
Now we decided to move from mainframe IMS-DB2 to Windows 2003 server-DB2 UDB
for LUW 9.5.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |