Previous Topic: Rules for Null Fields

Next Topic: NDB Journaling

NDB Transaction Management: Database Protection

An NDB is protected against system failures that might occur when an update to the VSAM data set is in progress. Database record locking prevents data corruption caused by multiple users accessing the same record simultaneously.

If it is possible for more than one user to access an NDB record at once, use the &LOCK verb to ensure exclusive access to the record while it is being accessed. That is, perform an &LOCK on a record before any operation that accesses that record proceeds. If another user subsequently accesses the record, any modifications made by the second user do not proceed until the first accessing procedure concludes and the record ceases to be locked.

Protection against system failures is achieved as follows: