- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you were sending a PDF file as an attachment to your email, you could use the PDFPASSWORD option with ODS PDF as shown here: http://support.sas.com/documentation/cdl//en/lesysoptsref/69799/HTML/default/viewer.htm#n1e4a3l9txg8... but I do not believe there is an equivalent option for ODS EXCEL (or however you're making your XLS file).
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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