BookmarkSubscribeRSS Feed
ssaha
Obsidian | Level 7

When I am running a SAS program in SAS EG, the owner of the file name(default is getrun) changes it to getsassrv.

The ID that SAS EG creates/updates to files is getsassrv but if the owner of the filename is getrun, how can I keep the default name i.e, getrun instead of getsassrv.

 

Example:

 

data plck.append;
set plck.process_check plck.process_check1;
run;

 

For this code, the owner of the file append i.e, getrun changes it to getsassrv.

 

For another code

 

proc append base=plck.append
data=plck.process_check;
run;

 

The owner of the file name append i.e getrun remaining as it is.

 

So how can I can keep the onwer of the file name remain as it is when I am running the 1st code?

 

3 REPLIES 3
Kurt_Bremser
Super User

You can't.

When you run this:

data plck.append;
set plck.process_check plck.process_check1;
run;

a new file named append.sas7bdat.lck is created alongside the existing append.sas7bdat. When the step finishes, the old append.sas7bdat is deleted, and the file append.sas7bdat.lck renamed to append.sas7bdat. Since UNIX does not allow a non-superuser to change ownership of files for security reasons, the file is now owned by the user running that step, and not by the owner of the old file.

When you run this:

proc append base=plck.append
data=plck.process_check;
run;

data is physically appended to an existing file (where you need to have write permissions ie through the group), and the owner ship is preserved.

ssaha
Obsidian | Level 7

Thanks for your reply. Appreciate your help.

 

I am working as SAS Admin. So are there any possible solutions to keep the default owner name as it is when running such type of codes.

Kurt_Bremser
Super User

@ssaha wrote:

Thanks for your reply. Appreciate your help.

 

I am working as SAS Admin. So are there any possible solutions to keep the default owner name as it is when running such type of codes.


Not easily (see my previous answer). You need to run the chown command as superuser, so you need XCMD enabled, and the user running the SAS code must be allowed to do the chown via sudo.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

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