BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Dear all,

The x command is not working in my EG client.

I tried to delete a file which exists in SAS Server (a remote machine) from my local EG Client. I could not delete the file and even I didn't get any errors or warnings in logs.

I've also checked whether the xcmd option is valid in my session and this option is valid.


I tried to use

x 'del \Q \F \\serverpath\filename';

my domain Id has the read,write or modify permissions only the above path(shared location)

But the file isn't deleted in the server location. Even When I tried to use local server path as

x 'del \Q \F F:\filename'; I could not delete it.

Is there any user permission I need to configure in Management console to execute the command or is there any configuration required?

Please provide the solution ASAP.
3 REPLIES 3
RichardH_sas
SAS Employee
X commands are disabled by default in EG. I turned up the following note which might be helpful. It is a bit dated... looks like it references EG 3.

http://support.sas.com/kb/17/490.html

FYI, there's a Data task called Delete Data Set and Formats. If all you need to do is delete a data set in a library on a SAS server, that will do the trick (assuming you have appropriate permissions to delete the table).
ChrisHemedinger
Community Manager
As Richard said, you need to make sure that XCMD is permitted (-allowxcmd) in your workspace server definition. If you make a change in SAS Management Console to enable this, you usually have to restart the object spawner to have it take effect.

You might try:

X 'dir';

Just to make sure that X commands are working.

Once you've established that X commands work, there are these additional considerations:

- does the user identity (account) that launched the SAS session have the appropriate permissions on the server machine to delete these files?

- if you are trying to access network resources (using the UNC \\server notation), Windows might get in your way if delegation is not enabled. By default, the server machine cannot pass your identity along to another server machine on the network to accomplish some work on your behalf; this needs to be enabled via an ActiveDirectory setting by an admin. See http://support.sas.com/documentation/cdl/en/bisecag/61133/HTML/default/a003181427.htm.

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
DF
Fluorite | Level 6 DF
Fluorite | Level 6
I found the below code when googling for a similar issue in the past. It's quite useful for working out what's actually happening with your X command:

filename whatever pipe "ls -al";
data command_output;
infile whatever truncover;
input value $ 1-180;
run;

This will run the command "ls -al" on your box, and send the console output to the dataset specified.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 3061 views
  • 0 likes
  • 4 in conversation