One example of CAKRINST usage is for the establishing of user security. The online query system can be used to access information from the CCCTAB and CCCMOD tables. These tables contain live charge information. It is likely that certain users will be required to have access to certain charges, perhaps based on the contents of an accounting structure. Such access can be implemented very easily using the CAKRINST program.
The original SQL statement used to give a user access to the CCCTAB table is:
CREATE SYNONYM CCCTAF FOR OWNER.CCCTAB
The online system accesses the table using the synonym CCCTAF. To implement a security rule allowing access to only the RESTON records we would use CAKRINST to execute the following:
DELETE SYNONYM CCCTAF:
CREATE VIEW CCCTAF AS SELECT * FROM OWNER.CCCTAB
WHERE STRUCT1 = 'RESTON';
Thus, when the online system accesses the table via the name CCCTAB, only RESTON records are made available.
Caution Great care should be taken when using CAKRINST in this way, since no validation/verification of the statements is made.
| Copyright © 2012 CA. All rights reserved. |
|