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.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

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
  • 770 views
  • 2 likes
  • 3 in conversation