IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to count number of rows that were deleted


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 1208
Location: Bangalore,India

PostPosted: Wed Feb 03, 2010 4:11 pm
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
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
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
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

Moderator Emeritus


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

PostPosted: Thu Feb 04, 2010 2:52 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top