On Wed, Oct 21, 2009 at 9:31 PM, Vern Hamberg <vhamberg@xxxxxxxxxxx>
I don't understand what you mean when you say that RPG's I/O model
doesn't map to RDBMS's. Seems to me there is little difference
functionally between cursor-based processing - a FETCH into a host
structure - and a CHAIN into a data structure (recent versions).
I have the same question. I think the partial answer is that the read
prior instructions don't have an SQL equivalent. Also, holding a
record lock. On the record lock front I would create a 2nd file that
held the keys of every row of a corresponding table that currently has
a read lock. Any SQL UPDATE instruction used on a table that could
currently have a record lock on it would have to include a WHERE NOT
EXISTS clause that selected records for update only if the keys to the
row were not found in the "currently locked row" table.