As stated, this problem was resolved by DB2 Version 8. And as always, thank you for stopping by and thanks for your continued support Willie Getting the Most out of DB2 for z/OS - The original DB2 for z/OS blog; now in its 12th year. if you like this blog and find it informative, entertaining, or even useful, why not click on the subscription icon in the top right-hand corner (it looks a lot like ) so you are automatically notified of every post.
Maybe you could even recommend this blog to a friend? Do you have a suggestion for a future blog post, then Click Here And, as usual, please remember: "These comments are my own personal opinions only and do not necessarily reflect the positions or opinions of my employer (IBM) or their affiliates.
DB2 no longer takes exclusive control of the entire table space to perform an update....
The behavior when updating the column(s) participating in the partitioning key in DB2 10, now that the ZPARM keyword PARTKEYU has been removed, is the equivalent to what you would have received should you had taken the default (YES) in DB2 9. No more parameter choices, no more locking problems..
If you want to review the complete syntax of the UPDATE statement then please refer to Books Online.
To properly show you how to use the UPDATE statement I will need to create a few tables to hold some sample data. Below is the code to create my Toy table: In order to show you how to UPDATE a table from data in another table I need to build a second sample data table that I will call New Toy Price.
I thought it would be useful to show examples using both RPG native database access and SQL.
First I need a file, as this is for example purposes it very simple, just two fields and one key field: What I want to do is to read/fetch all the records where the key field is equal to '1' and change the value of the second field to 'A'.
This file will be used for update, it is keyed, and user opened.All comments are based upon my current knowledge and my own personal experiences.You should conduct independent tests to verify the validity of any statements made in this blog before basing any decisions upon those statements.I have been asked to write some more about using SQL embedded in RPG programs.One question I have been asked by several people is how to update a row from a file that had been previously Fetched, just like READ and UPDATE using RPG's native database access.