Scénario de test & Cas d'usage
Management of access rights and data security.
Discover all actions of accessControlCreation of a sensitive salary table for the HR department context.
| 1 | |
| 2 | DATA casuser.exec_salaries; |
| 3 | LENGTH EmployeeID $8 Name $20 Salary 8; |
| 4 | INPUT EmployeeID Name Salary; |
| 5 | CARDS; |
| 6 | E001 Alice 150000 E002 Bob 145000 E003 Charlie 160000 ; |
| 7 | |
| 8 | RUN; |
| 9 |
| 1 | PROC CAS; |
| 2 | SESSION casauto; |
| 3 | ACCESSCONTROL.startTransaction; |
| 4 | /* Simulation: update access controls here */ |
| 5 | PRINT 'Transaction started. Objects implicitly checked out.'; |
| 6 | RUN; |
| 1 | PROC CAS; |
| 2 | SESSION casauto; |
| 3 | ACCESSCONTROL.commitTransaction RESULT=r STATUS=s; |
| 4 | PRINT r; |
| 5 | IF (s.severity == 0) THEN PRINT 'Transaction committed successfully. Locks released.'; |
| 6 | RUN; |
The action completes with a severity of 0. The access control changes are permanently saved to the server, and the 'exec_salaries' table is released from its transactional lock, making it available for general use.