Is there a way to password protect a file that is being built, zipped and emailed using ODS?
This is my current macro that builds the zip file and emails:
%macro zipemail(zpath=,spemail=,uemail=,workdate=,rptname=,fname=);
%if &syscc <= 4 %then %do;
ods package(&rptname.&workdate.) open nopf;
ods package(&rptname.&workdate.) add file="&zpath.&rptname.&workdate..xls" ;
ods package(&rptname.&workdate.) publish archive
properties(archive_name="&rptname.&workdate..zip"
archive_path="&zpath.");
ods package(&rptname.&workdate.) close;
filename my_email email "&spemail"
from="&uemail"
subject="&fname"
attach=("&zpath.&rptname.&workdate..zip"
content_type="application/zip");
data _null_ ;
file my_email;
run;
filename my_email clear;
%end;
%mend ;
Could code be added to password protect the report? if so what is the code and where is it inserted?
TIA,
Elliott
Google: "commandline password protect zip file"
If you're using GZIP, change zip to GZIP in the search
https://superuser.com/questions/162624/how-to-password-protect-gzip-files-on-the-command-line
I will look into that, we do currently use x commands to change the permissions on files. we are running sas 9.4 on linux.
Thank you
I have been searching for hours trying to find unix code to password protect an existing file.
Does anyone know what the x command should be to do that?
Thanks,
Google: "commandline password protect zip file"
If you're using GZIP, change zip to GZIP in the search
https://superuser.com/questions/162624/how-to-password-protect-gzip-files-on-the-command-line
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.