Technical data

READY
3. If you do not specify a realm-name, the DBCS (Database Control System)
readies all realms in your subschema except those already readied.
4. The USAGE-MODE phrase establishes run-time privileges for this run unit.
It also affects other run units running concurrently. It consists of two parts:
( a ) the allow mode, and ( b ) the access mode.
5. If the program does not specify a usage mode, PROTECTED RETRIEVAL is
the default.
6. The allow mode specifies what you will allow other concurrent run units to
do. It consists of the reserved words BATCH, CONCURRENT, EXCLUSIVE,
and PROTECTED.
7. The BATCH RETRIEVAL option allows concurrent run units to update the
realm. You can retrieve data as though a copy of the database had been made
at the time you readied the realm. This eliminates the possibility of deadlocks
due to record lock conflicts. Any updates made by concurrent run units will
not be available to your transaction.
If you ready any realm in BATCH, you must ready all realms in BATCH.
8. The BATCH UPDATE option allows you to access or update any data in the
realm while preventing concurrent run units from accessing or updating the
realm.
9. The CONCURRENT clause permits other run units to update records in
the same areas that map to the readied realm-name. Record-locking will be
done for you by the DBCS to protect the integrity of your currency indicators,
keeplists, and uncommitted changes. You will not be able to see any other
users uncommitted changes.
10. The EXCLUSIVE clause prevents concurrent run units from accessing records
in the same areas that map to the readied realm-name.
11. The PROTECTED clause (the default) prohibits concurrent run units from
updating records in the same areas that map to the readied realm-name.
Concurrent run units will be able to ready the realm for retrieval only.
12. The access mode indicates what your run unit will do. It consists of the
reserved words RETRIEVAL and UPDATE.
13. The RETRIEVAL clause (the default) allows your run unit read-only
privileges. It prevents your unit from updating records in the readied realms.
14. The UPDATE clause permits your run unit to update records in a readied
realm. It allows the run unit to execute any DML statement against the
specified realm.
15. The WAIT option tells the DBCS to READY the specified realms as soon as
possible. You will get a response only when the realms can be readied or
when an error other than a lock conflict occurs.
16. Currency indicators are not affected by the READY statement.
17. If a database exception condition occurs during the execution of a READY
statement, the DBCS places a database exception condition code in the
special register DB-CONDITION (see Technical Notes). This code identifies
the condition.
4–50 Procedure Division