I encountered the following requests that I never think of it.
If SAS will not work , is there alternatives that we can do using SAS like vbscript or cmd commands.. etc. I am aware RTF is a text file giving this read-only doesn't guarantee any strong securities.
Any suggestion? Thanks.
This paper has some examples:
https://www.lexjansen.com/pharmasug/2011/AD/PharmaSUG-2011-AD06.pdf
I would look into how to set those permissions from the OS.
If your SAS session has XCMD option enabled, then if you how to set the permissions via OS command, you can use the X or SYSTASK statement to execute the OS command.
So you're using SAS to generate the file, and also using SAS to set the permissions after generating the file. By having SAS send a command for the OS to execute.
So if you're on linux, look into the CHMOD command. And I'm sure there's something similar for windows.
Thank you @Quentin for quick options. I am kind of new to use the cmd in SAS ( windows). by any chance can you guide to the reference or a syntax will help. Really appreciate your time.
/* create renaming and looking for set read-only access*/
ods rtf file="c:\documents\sample.rtf";* style=table_rtf;
proc print data= sashelp.class;
run;
ods _all_ close;
*trying x command;
options noxwait;
data _null_;
x 'attrib r+ "c:\documents\sample.rtf"';
run;
This paper has some examples:
https://www.lexjansen.com/pharmasug/2011/AD/PharmaSUG-2011-AD06.pdf
thank you the references got what I need. It worked. Thanks you again.
options noxwait noxsync;
data _null_;
x 'attrib +r "D:\sample.rtf"';
run;
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.