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 get the details of rhte rows updated in the table

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

New User


Joined: 11 Aug 2005
Posts: 4

PostPosted: Mon Mar 12, 2007 6:06 pm    Post subject: How to get the details of rhte rows updated in the table
Reply with quote

Hi,

Can anyone pls tell me how to get the details of the updated rows of the table being used either by the SQL query/the Cobol-Db2 program.

Thanks
Venkatesh
Back to top
View user's profile Send private message

vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Mon Mar 12, 2007 6:17 pm    Post subject:
Reply with quote

You could find that, if you have any Updated timestamp punched into one of the columns of the tabel and the program is updating that column too when it updates the data.

If you dont have that then it would be difficult i would say. If your program has done some thing which it was not intended to do, then you can RECOVER using the image copies (if one was taken earlier).
I'm not sure whether this can be determined on LOGS.
If some traces were set to ON, then some experts could figure out this i guess.
Back to top
View user's profile Send private message
veselvar

New User


Joined: 11 Aug 2005
Posts: 4

PostPosted: Mon Mar 12, 2007 6:22 pm    Post subject: Re: How to get the details of rhte rows updated in the table
Reply with quote

Hi,

Thanks for ur note.

Can we get the details from the Sysibm.syscatalog thru the syscolumns_hist ?
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Mon Mar 12, 2007 7:27 pm    Post subject:
Reply with quote

No you cannot. That's a separate concept.
It does not have anything you need at this scenario.
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Wed Mar 14, 2007 6:54 pm    Post subject:
Reply with quote

If you are using a COBOL - DB2 program:
I read from a document that you can see the variable SQLERR(3) for the number of rows updated, inserted or deleted by a DB2 query from SQLCA( SQL communications area).

Anyway I did nt check it out. Give it a shot icon_smile.gif
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Wed Mar 14, 2007 7:14 pm    Post subject:
Reply with quote

Please find more details at http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2.doc.sqlref/bjnrsqlc999499.htm
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Wed Mar 14, 2007 9:06 pm    Post subject:
Reply with quote

That is valid only for embedded sql statements and SQLERR(3) could give value for only the previously executed embedded sql statement.
Say you have run the program and the program has updated/inserted/deleted few rows. Then i wonder how one could find that with out the controls in place.
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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm

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