(1) If doing a Cobol READ, you can avoid the question of locks by using READ WITH NO LOCK.
(2) If doing an SQL SELECT, you can avoid the question of locks by using WITH NC as the last clause.
(3) In various OSes, you can set your general commitment level to read without locking, or set your timeout to some arbitrarily low value, such as 0. Setting the timeout to 0, in most systems, means that you will not wait for a record at all. Watch out. In some, it means to wait forever. You can always set your timeout to a very low nonzero number, through.
Discuss This Question: 5  Replies