accessControl commitTransaction

Secure Persistence of Sensitivity Level Changes

Scénario de test & Cas d'usage

Business Context

The HR department is updating access policies for the 'Executive_Salaries' table. To ensure data integrity and security compliance, these changes must be applied atomically. The system must lock the resources during the update and strictly persist the changes only when the entire operation is validated, releasing the locks immediately afterward to allow legitimate access.
About the Set : accessControl

Management of access rights and data security.

Discover all actions of accessControl
Data Preparation

Creation of a sensitive salary table for the HR department context.

Copied!
1 
2DATA casuser.exec_salaries;
3LENGTH EmployeeID $8 Name $20 Salary 8;
4INPUT EmployeeID Name Salary;
5CARDS;
6E001 Alice 150000 E002 Bob 145000 E003 Charlie 160000 ;
7 
8RUN;
9 

Étapes de réalisation

1
Initialization of the transaction and simulation of an access control change (locking the table).
Copied!
1PROC CAS;
2 SESSION casauto;
3 ACCESSCONTROL.startTransaction;
4 /* Simulation: update access controls here */
5 PRINT 'Transaction started. Objects implicitly checked out.';
6 RUN;
2
Execution of commitTransaction to persist changes and release locks.
Copied!
1PROC 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;

Expected Result


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.