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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: To write a report on all updated records in the update query
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

Site Director


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

PostPosted: Wed Oct 22, 2008 8:30 pm    Post subject:
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    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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Report cost in CA-dispatch Nileshkul CA Products 3 Wed Jun 07, 2017 10:32 pm


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