accessControl checkInAllObjects

Performance/Volume: Batch Process Emergency Cleanup

Scénario de test & Cas d'usage

Business Context

A nightly ETL batch process manages temporary staging tables for different regions. If the process encounters a logic error mid-stream, it leaves multiple tables in a 'checked-out' state. The system administrator runs a cleanup script to force-release all locks held by the session to prevent deadlocks for subsequent runs.
About the Set : accessControl

Management of access rights and data security.

Discover all actions of accessControl
Data Preparation

Generate 5 regional staging tables.

Copied!
1 
2DATA casuser.region_north;
3x=1;
4 
5RUN;
6 
7DATA casuser.region_south;
8x=1;
9 
10RUN;
11 
12DATA casuser.region_east;
13x=1;
14 
15RUN;
16 
17DATA casuser.region_west;
18x=1;
19 
20RUN;
21 
22DATA casuser.region_central;
23x=1;
24 
25RUN;
26 

Étapes de réalisation

1
Simulate a batch process acquiring locks on multiple regional tables.
Copied!
1PROC CAS;
2 regions = {"region_north", "region_south", "region_east", "region_west", "region_central"};
3 DO r over regions;
4 ACCESSCONTROL.checkOutObject / uri="cas/caslibs/casuser/tables/" || r;
5 END;
6 ACCESSCONTROL.whatCheckoutsExist;
7RUN;
2
Execute the global cleanup action to release all 5 locks at once.
Copied!
1PROC CAS;
2 ACCESSCONTROL.checkInAllObjects;
3 ACCESSCONTROL.whatCheckoutsExist;
4RUN;

Expected Result


The action must handle multiple locks simultaneously. The final state must show zero checked-out objects, proving the bulk release capability works efficiently.