1) it is better to use a single update - it will save you time, io and log space consumption
2) it is better to update in blocks, updating in a bulk cause a very high impact on the log, and if your program will encounter an error, all work will be rolled back. using blocks you can restart your program if it fails. Consider locking the entire table before you begin in order to reduce overhead caused by many lock request
3) yes.
4) i think the best approach would be to create some user defined function that does the operation for you, and then just call it in the update. this way the data does not have to come back to your application at all - will save significant amount of time
update table
set column = my_func(column)
or,
you can save yourself all this trouble and buy a tool that does this,
for example, this is a link to an ibm certified tool that can do this, and it will ofer you more features for example, if you have foreign keys, it will maintain your data integrity
http://www.orbiumsoftware.
you can download a free version in order to try it first
there are more tools in the market that have this functionality, but this is the cheapest one I know of, and it sounds like your needs are rather basic.
maybe the it will cost you more to code and test your cobol program than buying such a tool
Main Topics
Browse All Topics





by: giltjrPosted on 2009-10-22 at 18:57:03ID: 25640829
Why not encrypt it?