I've been searching for answers to these questions, but not finding anything definitive. What Linux permission(s) are needed on a .sas code file for a user to be able to open the file and run the code within Enterprise Guide? Is it just 'Read' permission?
Is it any different if you are doing a %include of another .sas file within the script, does that %include'd .sas file only need to have 'Read' permission for the user running the code within Enterprise Guide?
Is the 'Execute' permission only needed for a user submitting in batch on Linux?
Do not set the execute bit on a .sas file in Unix. That will just confuse Unix into thinking that it can directly execute the file. But the file has SAS code, not Unix shell commands, so if you try to execute no good things will happen.
I haven't tested, but I would think read permission would be enough. As long as EG can open the program, you should be fine. EG isn't really executing the .sas file, it's taking the code in the .sas file and sending it off to the server to execute. Similarly for a %include, read access should be fine.
Of course if you have a linux server at hand, should only take 10 minutes to test it and confirm.
Do not set the execute bit on a .sas file in Unix. That will just confuse Unix into thinking that it can directly execute the file. But the file has SAS code, not Unix shell commands, so if you try to execute no good things will happen.
Thanks for this - I don't plan on executing this specific code in batch, but for future knowledge would the same be true for .sas files that one would want to submit in batch, like scheduled with cron or other means?
Yes. You would schedule a job to execute SAS itself.
So you might have a line like this to run a SAS program at midnight every night.
0 0 * * * 'cd /myfiles ; sas myprogram.sas'
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.