Automatic Record Locking

If you are using automatic record locking, the READ statement acquires a record lock automatically. To avoid locking a record, use the WITH NO LOCK clause in the READ statement.

Note: When the RM Compiler directive is set, automatic record locking is enabled by default.

To specify automatic locking, use the LOCK MODE IS AUTOMATIC clause in the SELECT clause for the file:

 select fd-name
     assign to "muser.dat"
     lock mode is automatic
     read fd-name