BookmarkSubscribeRSS Feed
AviS
Fluorite | Level 6

Hello!!

I have a SAS program which when I run manually copies file with read/write access but when run in scheduler in SAS Server copies file only with read access.

How can I resolve it to copy files with read/write access even when run in SAS server scheduler?

 

data _null_;

rc=fcopy('src', 'dest');

run;

 

 

2 REPLIES 2
Tom
Super User Tom
Super User

Can you run system commands from SAS?   Is SAS running on some flavor of Unix?

Perhaps SAS is using the umask setting of the process that started SAS?

Check your umask setting.

Personally I like to use 002 as the umask instead of 022 so that new files are created with both user and group write bits set to enable teamwork.

 

If you can run system commands and are using unix then use the cp command with -p option to preserve the permission when copying the file.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

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