Help using Base SAS procedures

chmod 777 access to a file

Accepted Solution Solved
Reply
Super Contributor
Super Contributor
Posts: 440
Accepted Solution

chmod 777 access to a file

[ Edited ]

hello,

my SAS exports a  file temp.csv to UNIX----->> /folder1/folder2/folder3/temp.csv

and most  of the time  i forget to  give ppl permission to it  which i do it  in  unixSmiley Happy

Is there a  way the access could be  granted in SAS before  exporting the  file to  UNIX?

 

Thanks


Accepted Solutions
Solution
3 weeks ago
Super User
Posts: 5,099

Re: chmod 777 access to a file

Before exporting it?  No.  The file has to exist in the Unix system for you to be able to grant permissions.

 

After exporting it, you could add within the same SAS program:

 

%sysexec chmod 777 /folder1/folder2/folder3/temp.csv;

View solution in original post


All Replies
Super User
Posts: 6,982

Re: chmod 777 access to a file

The surest way is to set it after the file has been written, either with the x statement, or the filename pipe method.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
3 weeks ago
Super User
Posts: 5,099

Re: chmod 777 access to a file

Before exporting it?  No.  The file has to exist in the Unix system for you to be able to grant permissions.

 

After exporting it, you could add within the same SAS program:

 

%sysexec chmod 777 /folder1/folder2/folder3/temp.csv;

Super Contributor
Super Contributor
Posts: 440

Re: chmod 777 access to a file

sorry meant to say after  it  gets  exported and  thank you Astounding.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 249 views
  • 2 likes
  • 3 in conversation