I have SAS legacy code which is migrated to SAS Viya. In the code ,there are some X-commands which does not execute in SAS Viya. How do I run my x-commands in Viya Studio.
x "rm /data/sas/xplo/abc2405kjh.csv";
You probably have NOXCMD as an option.
Check the log after submitting this:
proc options option=xcmd; run;
But for the operating system command 'rm', you can use the SAS FDELETE function instead!
The FDELETE function allows us to delete directories or files directly controlled by SAS.
data _null_; rc = filename(fref,"/data/sas/xplo/abc2405kjh.csv"); rc = fdelete(fref); rc = filename(fref); run;
Also see the documentation of the FDELETE Function. The other file handling functions are found right next to it.
Have you seen this page in the official documentation?
That's something that a SAS Admin has to do, not an individual user.
The SAS Viya Administrator can enable XCMD in the SAS Environment manager for SAS Studio V.
This link shows step by step how to enable XCMD in environment Manager. The method works.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.