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

what is rowcount from UPDATE called in db2 cobol pgm?

In a batch db2 cobol pgm, Do you know what the variable is called that
holds the number of rows back from an sql operation such as a SELECT or
UPDATE?

--
Message posted via http://www.dbmonster.com
Nov 12 '05 #1
3 6672
mike tom via DBMonster.com wrote:
In a batch db2 cobol pgm, Do you know what the variable is called that
holds the number of rows back from an sql operation such as a SELECT or
UPDATE?

It should simply be the ERRD[3] field in the SQLCA.
Only SQL PL has sepcial syntax "GET DIAGNOSTIC ... = ROW_COUNT"
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2
> mike tom via DBMonster.com wrote:
In a batch db2 cobol pgm, Do you know what the variable is called that
holds the number of rows back from an sql operation such as a SELECT or
UPDATE?

It should simply be the ERRD[3] field in the SQLCA.
Only SQL PL has sepcial syntax "GET DIAGNOSTIC ... = ROW_COUNT"
Cheers
Serge
--
Serge Rielau


On DB2 for z/OS I believe ERRD[3] only contains rows affected by an insert,
update, or delete, and does not indicate rows selected (unless they have
changed that recently).
Nov 12 '05 #3
Mark A wrote:
mike tom via DBMonster.com wrote:
In a batch db2 cobol pgm, Do you know what the variable is called that
holds the number of rows back from an sql operation such as a SELECT or
UPDATE?


It should simply be the ERRD[3] field in the SQLCA.
Only SQL PL has sepcial syntax "GET DIAGNOSTIC ... = ROW_COUNT"
Cheers
Serge
--
Serge Rielau

On DB2 for z/OS I believe ERRD[3] only contains rows affected by an insert,
update, or delete, and does not indicate rows selected (unless they have
changed that recently).

On DB2 for LUW is contains the "estimated" # rows for select.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Batista, Facundo | last post by:
People: I'm trying to convert my father from using COBOL to Python, :) One difficult thing we stuck into is how to read, from python, files written with COBOL. Do you know a module that...
1
by: FLORAL | last post by:
One Update statement in my following function UpdateSuccess_Order goes like this: Function UpdateSuccess_Order(ByVal Ord_No, ByVal Ord_NoSuccess, ByRef strError) UpdateSuccess_PAL = "ERROR"...
2
by: louis | last post by:
When I need to perform an update against multi-million row table I typically specify @@rowcount, to reduce locks. e.g. set @@rowcount 1000 while exists (select * from myTable where col2 is...
5
by: wackyphill | last post by:
Is Set RowCount @RowCount More efficient than simply using TOP? Thanks for any input.
3
by: Dimitri Furman | last post by:
SQL Server 2000 SP3. Is it possible for the @@ROWCOUNT function to return NULL after a statement? I am troubleshooting a relatively large stored procedure with multiple SELECT statements and a...
3
by: darrel | last post by:
We've had a month long headache with one of our functions in the CMS we've built. Whenever a page is updated in our CMS, we do a recursive call to the DB to get all the pages (and child pages,...
0
by: cobug | last post by:
Dear COBOL Users, Articles are being sought for the COBOL User Groups (COBUG) newsletters. Will you help us in our efforts to provide newsletters for the COBOL community at large? The...
2
by: Anju15 | last post by:
Hi , i have a cursor for deletion, updation,and insertion and inside each iam using sql%rowcount to get the number of rows affected. Now the problem is, the delete query is returning 0 records,...
3
by: Andrus | last post by:
I have DataGridView in virtual mode containing 3500 rows. In code below, assigning to RowCount value to 3500 takes 8 seconds. CPU usage goes high at this time. Stepping by F11 into user code shows...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.