Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us