Hello everyone,
Is there a way to schedule a SAS program to run on SAS Studio on a VIYA 3.4 deployment?
It is necessary to schedule the job on SAS Studio instead of SAS Studio 5 because the program uses the X command, which is not supported on Studio 5.
Thank you very much for your help!
@annamerkou - If you are referring to X commands being disabled, ask your SAS administrator about enabling them.
Hello @SASKiwi , thanks for your answer. I am referring to Computeserver (hence Studio 5) not being able to support X commands, as is what I've read in the official documentation. So I am wondering if that is still the case, or maybe some development on the matter has been made? Unless there is a workaround of course! Thank you once again!
@annamerkou wrote:
Hello @SASKiwi , thanks for your answer. I am referring to Computeserver (hence Studio 5) not being able to support X commands, as is what I've read in the official documentation. So I am wondering if that is still the case, or maybe some development on the matter has been made? Unless there is a workaround of course! Thank you once again!
Whether your SAS session was started with the XCMD option on or off is determined by the application server you are using. Not the user interface (SAS/Studio,Enterprise Guide, etc.) you are using to connect to it.
So ask your administrators to show you how to connect SAS/Studio version 5 to an application server that has the XCMD enabled.
But note that you cannot schedule SAS/Studio. (Unless you have a bot that could fool SAS/Studio into thinking it is a human interacting with it). You schedule SAS code instead.
@annamerkou - This is not a SAS Studio restriction, it is a SAS Server setting that just needs changing.
Hello again, thank you for your replies @SASKiwi , @Tom !
The XCMD option is enabled on the application server, however when I try to run on StudioV a simple command such as the following:
data _null_;
x cd /data/;
run;
I get the error: ERROR: Shell escape is not valid in this SAS session. However, when I run the same command on Studio, it runs perfectly!
The XCMD is enabled by adding the line USERMODS="$JREOPTIONS -allowxcmd" to the opt/sas/viya/config/etc/spawner/default/spawner_usermods.sh fconfig file. Is there maybe another config file that should be updated?
Thank you!
Have you tried enabling xcmd via management console instead of modifying the config-file?
@annamerkou - There is no SAS Management Console in Viya, only SAS 9.x has this.
SAS Studio 5 works with Viya servers so it looks like you are missing a config change on that.
SAS Studio 3 works with SAS 9.x servers so I'm assuming that is where you have successfully made the config change.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.