BookmarkSubscribeRSS Feed
annamerkou
Fluorite | Level 6

 

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!

 

10 REPLIES 10
andreas_lds
Jade | Level 19
Talking to your local sas admins is the best way to solve the problem. Afaik you don't schedule anything using sas studio (this information could be outdated).
annamerkou
Fluorite | Level 6
Thank you for your answer! While we're at it, is there any solution to the X command issue on Studio 5? Thanks again!
SASKiwi
PROC Star

@annamerkou  - If you are referring to X commands being disabled, ask your SAS administrator about enabling them. 

annamerkou
Fluorite | Level 6

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! 

Tom
Super User Tom
Super User

@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.

SASKiwi
PROC Star

@annamerkou  - This is not a SAS Studio restriction, it is a SAS Server setting that just needs changing.

annamerkou
Fluorite | Level 6

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!

andreas_lds
Jade | Level 19

Have you tried enabling xcmd via management console instead of modifying the config-file?

annamerkou
Fluorite | Level 6
Well that is the only method I came across in the official documentation, and I am not sure there is a Management Console in our VIYA 3.4 installation.
SASKiwi
PROC Star

@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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 2647 views
  • 1 like
  • 4 in conversation