PDA

View Full Version : Record locking in SQLRPG program.



maxb@bfcsoftware.com
01-01-1995, 02:00 AM
I have a SQLRPG program that removes all records from a file by warehouse number. My question is what will SQL do if two people attempt to run the program at the same time? Will SQL generate a error message similiar to what would happen in a RPG program if I attempt to access a record locked in another program? I have looked in the IBM online information web site looking for record locking error handling with SQL with no success. Any help would be appreciated. Thank you.

Guest.Visitor
01-13-2000, 05:22 PM
Hi Max, Take a look in the SQL manuals regarding isolation levels and transactions. Yes, you will get an error if SQL can't delete the row. To help clarify things, you might want to copy a set of records, then write a small program to lock a record and finally try an interactive SQL DELETE statement against the copied data. Best, Joe Sam Joe Sam Shirah Autumn Software Consulting/Development/Outsourcing Please Note New Email: jshirah@attglobal.net Visit our User Group at: http://www.jax400.com