10-17-2016 06:09 AM
I like to run few commands like deleting large number of files via SAS code. However, the system replies
ERROR: Shell escape is not valid in this SAS session.
Now the solution to rectify this (enable x command) is provided in the manual but too cryptic.
sc delete “SASStudioSpawner”.
“C:\Program Files\SASHome\SASFoundation\9.4\objspawn.exe” —configFile “C:\sas\studioconfig\spawner\spawner.cfg” —install —name SASStudioSpawner —servicedescription “SAS Studio Object Spawner” —logconfigloc “C:\sas\studio\config\spawner\logconfig.xml” —allowxcmd
I am unable to use this due to many reasons. For example, I am unable to find SASStudioSpawner to stop it. Secondly, there is no SASFoundation inside SASHome. Finally there is no SAS directory in inside C: drive.
I wonder if you can help me how to enable x command through more easy to follow steps.
10-17-2016 06:28 AM
Since you posted this in the Analytics U community, I suspect you are using SAS University Edition. if this is the case, you cannot do this. SAS UE is a closed environment for learning purposes, and cannot be reconfigured.
10-17-2016 06:31 AM
SAS UE version comes as a Virtual Image, it does not have a c: nor is it related to c: on your local machine, it is all encapsulated within the VI. So you would need to perform those steps within the virtual image.
However, that being said, X commands are turned off for a reason. Doing file manipulation via OS can be extremely risky - which you will find out one day when you wipe a drive. I would highly recommend not doing things this way at all. If you really have to do this (and again, I strongly advise against it - but noboddy listens until Windows stops working as half its files have been removed accidentally) then use the SAS functions (assuming they are in UE edition):
Do note, that the UE is a learning edition, it is not meant to be used for any serious purpose.
10-17-2016 08:22 AM
Good point 'esteemed afvisor'. NOXCMD is often the default for EG and SAS Studio because those products are directed to non programmers. Programmers need an operating system to leverage SAS with popular analytic packages like R, Perl and Python.
10-17-2016 08:37 AM
X option is turned off in almost all instances I have come across. The reason is that it is very dangerous. Access to the OS can allow any number of: removals of data, either accidentally or maliciously. It can also allow backdooring - i.e. system security avoidance. Generally speaking there is rarely any need to goto the system level, sure occasionally there maybe a call for directory commands or simliar and SAS provides functions for that, so again, no need to drop to OS level for that.
As for running third party software such as R, Python, well not everyone is using those, and if you are (or considering it), then there should be a process in place to govern the use of said items which you and your IT group would work towards, perhaps as an integrated development area with cut down access, so the unvalidated %delete_some_files() macro doesn't go and wipe out your OS files or that connect_to_dodgy_site python script doesn't retrieve a gb of copyrighted material.
So yes, to quantify, there are very few reasons why a SAS user would need to go to OS level commands, and the risk therefore cannot be understated.
10-17-2016 08:43 AM
Now here I beg to differ. If J. Random User is able to do more than kill his own files (which can be restored from backup anyway), the system administrator has f***ed up. Big time.
I'd rather be concerned with the intricacies of SAS metadata, where the fine granularization of permissons is much more inviting to oversight.