Updating the record using cursor Free sexy flash chat rms
If you are going to update the current cursor you need to aware that your cursor: How do the two compare when it comes to speed performance?
The SQL RPG program could be slower than the purely RPG one the first time the cursor is used, but eventually the Db2 for i engine will retain the access path to the file after a couple of times and the speed of processing of the two will be comparable.
There can be a situation where you have to use a cursor, even though the experts say not to use cursors or to avoid them as much as possible.
This has the benefit of doing most of the work in SQL and only updating based on the rowid, a unique address in the table.
It declares a type, which you place the data within in bulk, 10,000 rows at a time. However, as I say this will not be as efficient as Name ; type t__data is table of c_data%rowtype index by binary_integer; t_data t__data; begin open c_data; loop fetch c_data bulk collect into t_data limit 10000; exit when t_data.count = 0; for idx in t_data.first ..
By using the built in function only the fields listed are updated. Line 19: This procedure would be where the data in the read record would be processed.
Line 21: When the second Do loop is left the file is closed.