DATA Step, Macro, Functions and more

Using the UNIX "cp -p" command within SAS

Reply
Occasional Contributor
Posts: 7

Using the UNIX "cp -p" command within SAS

Hi,

 

I'm trying to submit the following code where I need to copy the file "sample.sas" from one folder to another whilst preserving the owner of the file. It executes without error and copies the file, but it changes the owner despite having the '-p' statement.

 

Any ideas - am I missing something?

 

filename copy pipe "cp -p /team/dave/sample.sas /team/marc ";

data error;
  file copy;
run;
Super User
Posts: 11,343

Re: Using the UNIX "cp -p" command within SAS

Have you tried using the X command to send commands directly to the operating system?

Occasional Contributor
Posts: 7

Re: Using the UNIX "cp -p" command within SAS

Hi, yes I have. Identical issues there as well.

Super User
Posts: 11,343

Re: Using the UNIX "cp -p" command within SAS

Here's something to think about. If you are using a SERVER version of SAS the code is executed by the server. Perhaps the owner is the Server running SAS??

Ask a Question
Discussion stats
  • 3 replies
  • 342 views
  • 0 likes
  • 2 in conversation