Hi, my system currently uses scripts to run our batch jobs for EG. However we occasionally encounter table locks due to users accessing the tables therefore resulting in batch job failure. During the re-run of batch job from previous point of failure, we will then use SAS Management console to personally deny user access to the respective tables. We are currently working on the codes to be keyed in SAS EG to grant and deny access for our users through the sas scripts but we are encountering error. Can someone please assist me on how to get it started?
Keyed in this line of code in SAS EG
sas-show-metadata-access -profile Admin /DemoBranch/DemoFolder;
Error I got from this line of code is
ERROR 180-322: Statement is not valid or it is used out of proper order.
When I keyed in proc sas-show-metadata-access -profile Admin /DemoBranch/DemoFolder;
Error I got from this line of code is
ERROR 22-322: Syntax error, expecting one of the following: ;. AUDIT, CC, CLEANUP.
ERROR 76 -322: Syntax error, statement will be ignored.
Thank You.
Please post code and log your are executing.
Afaik there is no "proc sas-show-metadata-access" - the name violates sas naming rules.
You are trying to run a SAS batch tool as SAS code - it isn't going to work as it designed to be run from an operating system command line:
The best way to avoid table locks is to run all of your batch jobs in a production environment where users have read-only access (set up using OS permissions) and this is best done using server-based scheduling.
@SASKiwi read-only access doesn't really help. Any user who leaves a Viewtable open will block that dataset against writing.
@Kurt_Bremser - agreed VIEWTABLE locks datasets regardless of OS permissions.
You're thinking much too complicated here. If you have a UNIX server, it is extremely easy to get around locked SAS datasets by removing them first from the filesystem before you write them.
Alternatively, set up a time window where all services that could lock datasets (mainly the workspace servers) are stopped, and run your batch processing in that time window.
Denying access to a user will not have ANY effect on a SAS session that was started before that. Open files will stay open until they are closed from within the session or the session is terminated.
Hi, my system currently uses scripts to run our batch jobs for EG. However we occasionally encounter table locks due to users accessing the tables therefore resulting in batch job failure. During the re-run of batch job from previous point of failure, we will then use SAS Management console to personally deny user access to the respective tables. We are currently working on the codes to be keyed in SAS EG to grant and deny access for our users through the sas scripts but we are encountering error. Can someone please assist me on how to get it started?
Keyed in this line of code in SAS EG
sas-show-metadata-access -profile Admin /DemoBranch/DemoFolder;
Error I got from this line of code is
ERROR 180-322: Statement is not valid or it is used out of proper order.
When I keyed in proc sas-show-metadata-access -profile Admin /DemoBranch/DemoFolder;
Error I got from this line of code is
ERROR 22-322: Syntax error, expecting one of the following: ;. AUDIT, CC, CLEANUP.
ERROR 76 -322: Syntax error, statement will be ignored.
Thank You.
Why do you repeat your post?
@roth1 wrote:
Hi, my system currently uses scripts to run our batch jobs for EG. However we occasionally encounter table locks due to users accessing the tables therefore resulting in batch job failure. During the re-run of batch job from previous point of failure, we will then use SAS Management console to personally deny user access to the respective tables. We are currently working on the codes to be keyed in SAS EG to grant and deny access for our users through the sas scripts but we are encountering error. Can someone please assist me on how to get it started?
Keyed in this line of code in SAS EG
sas-show-metadata-access -profile Admin /DemoBranch/DemoFolder;
Error I got from this line of code is
ERROR 180-322: Statement is not valid or it is used out of proper order.
When I keyed in proc sas-show-metadata-access -profile Admin /DemoBranch/DemoFolder;
Error I got from this line of code is
ERROR 22-322: Syntax error, expecting one of the following: ;. AUDIT, CC, CLEANUP.
ERROR 76 -322: Syntax error, statement will be ignored.
Thank You.
These were originally two separate threads before I merged them. Seems to be an erroneous double-post.
PS just happened to me. I hit the "post" button a second time before the "posting success" page started to load.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.