If you are writing a program for a multi-user system, you must allow for contention, when two or more users attempt to change the same record at the same time. DP4 does most of the hard work. If a record is in contention, the transaction of which this record is a part will not be allowed to update the database and a fail code will be returned. You must determine how your program responds.
User A reads a record from the database, makes changes to it and then before it is updated to the database, user B reads the same record and also makes changes to it. The first of the users to finish making changes will be able to update the database, but when the second attempts an update, it will not be successful.
If you are developing programs to run on a DP4 special resilience system, using two or more servers, you will need to consult your documentation for an explanation of how contention is handled.
Two mechanisms are provided for handling multi-user access: