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

To write a report on all updated records in the update query


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
satish kanamarlapudi

New User


Joined: 23 Jul 2008
Posts: 29
Location: Little Rock - Arkansas

PostPosted: Wed Oct 22, 2008 2:41 pm
Reply with quote

Hi All,

My requirement is that, in the update query based on the key fields for group number and division number on the table which are read from the input file, all the records are updated using a update query, but i want to write a report on all the records that are updated when the update is successful. Since the query at a time picks up all the records satisfying the condition and updates them at a time, for every input record only once the update query is executed. Please let me know how to write a report on all the updated records.

Note :- Using cursor we can write it by declaring a cursor, fetch n for each n every successful fetch we can update n write a report, but do let me know any other options where there could be minimal changes in the code.

Thx,
satish



Thx,
satish
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: Wed Oct 22, 2008 8:30 pm
Reply with quote

Hello,

Quote:
let me know any other options where there could be minimal changes in the code
I'd suggest the priorities be adjusted.

The code needs to meet the business requirement, work correctly every execution, be easily maintainable, and not consume a reasonable amount of system resources.

If this takes 20 or 70 lines of code is not the issue. Something done with only the goal of "minimal changes" will usually not be well done and the cost of supporting/running it outweighs the cheapness of the delivery.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top