473,604 Members | 2,667 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6693
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
14796
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 allows me to do that? It should avoid us the work to write a COBOL program that open the COBOL
1
5205
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" Dim SQL, ITZ_RESULT, zRS Dim Tmp, cnt cnt=-999
2
7437
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 null) update myTable set col2 = col1 + 'blahblah' where col2 is null
5
11000
by: wackyphill | last post by:
Is Set RowCount @RowCount More efficient than simply using TOP? Thanks for any input.
3
10826
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 couple of INSERTs into table variables. Immediately after each statement I save the value returned by @@ROWCOUNT to a local variable. That information eventually is passed back to the client via one output parameter, for all statements in the...
3
1486
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, and child child pages, etc.) and then create an XML file, and save that to the filesystem. The front end then uses that XML file along with some XSL to create the site menus, site maps, etc. We're having a problem where 99 out of 100 times, this...
0
1764
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 COBUG newsletters will be an independent place to exchange information on any topic related to COBOL. This is an opportunity for
2
8454
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, update is returning 1 record and insert query actually have 0 records , but still its giving the count as 1. is there any way to reset the value of sql%rowcount to return no.of rows affeceted by last dml.
3
5720
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 few celltemplate property getters and combobox/datecombo constructor calls without database access which does not take a lot of time. Debug output (below) shows lot of messages Stepping over non-user code. Running in release mode from...
0
7929
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,...
0
8419
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8406
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8065
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,...
0
8274
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6737
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, 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...
1
5882
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
1522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1262
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.