Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to count number of rows that were deleted

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
mohanrao

New User


Joined: 11 Jun 2005
Posts: 13
Location: bangalore

PostPosted: Wed Feb 03, 2010 4:00 pm    Post subject: how to count number of rows that were deleted
Reply with quote

Hello Everyone,

can you please let me how to count the number of rows that got deleted from a db2 table.
I tried using count(*) and moved that to a host vairable.

Apart from the above way is there any other option to achieve the same.

Thanks in Advance,
Mohan
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Feb 03, 2010 4:11 pm    Post subject:
Reply with quote

Hello Mohan,

Welcome to the forum.
I suggest you to search into the forun before starting new topic.By the way you can get the data from SQLERRD(3) which contains the number of rows affected by the embedded data change statement
Back to top
View user's profile Send private message
mohanrao

New User


Joined: 11 Jun 2005
Posts: 13
Location: bangalore

PostPosted: Wed Feb 03, 2010 4:19 pm    Post subject: Reply to: how to count number of rows that were deleted
Reply with quote

Hi,

Sorry to one n all if I have posted a question which was discussed earlier.
Actually this is DYL-280 requirement wherein it requires to display a count of the number of rows deleted .

Regards,
Mohan
Back to top
View user's profile Send private message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Wed Feb 03, 2010 6:59 pm    Post subject:
Reply with quote

Hi Mohan,

Use SQLERRD(3) from SQLCA after delete to Display number of rows affected as clearly stated by Ekta in his previous post.
Back to top
View user's profile Send private message
mohanrao

New User


Joined: 11 Jun 2005
Posts: 13
Location: bangalore

PostPosted: Thu Feb 04, 2010 1:58 am    Post subject: Reply to: how to count number of rows that were deleted
Reply with quote

Hi All,

Thanks for your replies. I completely agree that options suggested by forum works perfectly well for a normal cobol-db2 program.
But as per requirement it is a DYL-280 program and hence SQLERR(3) wont work.
Please correct me if Iam wrong.

Regards,
Mohan
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 04, 2010 2:52 am    Post subject:
Reply with quote

Hello,

What does the documentation suggest? Possibly there is something internal to the product where this can be retrieved?

You might open an issue with CA Support and ask what options are available. If i remenber correctly, this is now called CA-Vision. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Row-Numbers of distinct rows? Auryn DB2 1 Thu Oct 20, 2016 4:38 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us