In prior releases, the use of a key by CBS (and SQL) was normally allowed but could be restricted using the CXXMAINT function of DBUTLTY with the keyword OPTION=ALTER with CBS=YES/NO.
With Version 15.0, the key usage has been expanded.
CA Datacom Datadictionary allows an optional KEY-USAGE attriute with each key definition reflecting access. KEY-USAGE can be set to ANY, RAAT, CBS/SQL, or NONE.
The value ANY shows that all access using the key is allowed. The value of RAAT shows that all Record At A Time requests using the key is allowed, and all Set At A Time and SQL requests using the key are not allowed. The value of CBS/SQL shows that all Set At A Time and SQL requests using the key are allowed, and all Record At A Time requests are not allowed. The NONE shows that the key may not be used for access to the table.
The key usage is set in the CXX during a catalog of the database from CA Datacom Datadictionary or the alter of the key from CA Datacom Datadictionary.
During the catalog of a database, there will never be user applications executing against the table. During the key alter, executing programs are allowed with the table open. If there are executing programs, the change to allow access is instantly granted to all programs. The reverse is not true.
There will be instant restrictions applied, and there will be delayed enforcement of key usage. For CBS/SQL any request area that defines a set and has had a SELFR that has accepted key usage will be allowed to continue with all commands for the set. Any SELFR request that searches for candidate key definitions will reject and skip over every key set to be blocked to CBS/SQL. SQL mostly uses the CBS command set processing, and therefore the same rules apply as above.
When SQL uses RAAT for processing, it is allowed using the rules for CBS/SQL and not the rules for RAAT. For RAAT, any request for an initial key usage command (R??KY/KG/KR/KX-LOCKY/KG/KR/KX-GSETL) will fail with return code 03(027). Next or sequential commands will be allowed to continue.
The primary reason for the feature is to ‘test’ delete the key definition and to wait for several weeks to months to be sure there are no RAAT program failures or much slower CBS/SQL queries. Another reason may be that if a key definition is added to speed CBS/SQL, there may be value in preventing RAAT usage, so that the definition can be easily changed to other fields or be deleted without risk of making RAAT programs fail.
A – Active (Key is available for all read access)
C – CBS/SQL read access (SAAT and SQL) only is allowed. No RAAT access.
R – RAAT read access only is allowed. No CBS/SQL (SAAT) access.
N – No read access by either RAAT or CBS/SQL (SAAT) commands is allowed.
The KEY-USAGE option must be set as ‘A’ ANY if the key is:
Altering key use during a catalog is allowed. Altering key use during an alter key is not allowed when:
|
Copyright © 2014 CA.
All rights reserved.
|
|