BookmarkSubscribeRSS Feed
Yuriy2301
Calcite | Level 5
Hi,

does somebody can help with next issue:
I need to encrypt data when exporting data from SAS dataset to excel file,
then I send this file with FILENAME EMAIL statement, that's why I need data to be encrypted.
Or maybe there is another way to encrypt data for sending through email?
Remark: creating excel files and sending them to email are doing programmatically, so that method of encryption should also working on similiar way.

Thanx
9 REPLIES 9
Cynthia_sas
SAS Super FREQ
Hi:
You might want to open a track with Tech Support on this question. When you export a SAS dataset to Excel, you are generally using PROC EXPORT. I do not believe there is a way to force PROC EXPORT to encrypt the data -after- it has gone to Excel.

If you are using ODS HTML or ODS TAGSETS.EXCELXP or ODS CSV to send procedure output to Excel -- again, I do not believe there is a way to encrypt the SAS output (HTML, XML or CSV) once it has been created.

There are some new system options in SAS 9.2, as described in this document:
http://support.sas.com/documentation/cdl/en/secref/62092/PDF/default/secref.pdf

But they don't seem quite relevant to your question -- which is about controlling encryption after SAS has created a file.

To open a track with Tech Support, fill out the form at this link:
http://support.sas.com/ctx/supportform/createForm

cynthia
Doc_Duke
Rhodochrosite | Level 12
Excel's encryption is generally weak, so I would not trust it. It takes about 10 minutes to break an Excel 2003 file.

What you might want to consider is to write the Excel file to disk, then x-out from SAS to run a batch encryption with WinZip or 7Zip, and finally to use SAS to e-mail that file.

If your office supports a secure e-mail tool, you can usually get to it from the SAS e-mail (for instance, with our Tumbleweed secure e-mail server, I just have to put "(secure)" (no quotes) in the title line to get the encryption to kick in. Your local tech support may have the answer to this one.

Doc Muhlbaier
Duke
Yuriy2301
Calcite | Level 5
Hi Doc,

could you explain more detailed with "then x-out from SAS to run a batch encryption with WinZip or 7Zip"?
maybe you have some example or piece of code where similiar is doing?
Is this possible to run a batch encryption from SAS code?
Doc_Duke
Rhodochrosite | Level 12
Since I have tumbleweed, I don't have an example for you. The X command is a standard part of SAS base. You can find the syntax on support.sas.com . If you look at the 7 Zip web site, you can find the syntax for running 7 Zip in batch.
Yuriy2301
Calcite | Level 5
Hi

I tried X command and it works in SAS Base 9.1,
but in Enterprise Guide and Data Integration Studio tools (which are on the same server) it doesn't.

Maybe some ideas why so?
Doc_Duke
Rhodochrosite | Level 12
The X command is disabled by default in EGuide. There are a number of threads in the EGuide form that discuss enabling it. I don't use DI Studio but suspect the same situation.
JayPabla
Calcite | Level 5

Hi,

I'm relativly new to SAS, i have SAS 9.1 and 9.2 and would like to be able to copy your method of encryption please.

I currently use SAS to export a dataset to Excel 2003 format.

I then use DDE to open the file in Excel, do some manipulation and save and close.

I'd like to be able to use SAS to Zip the file and email it out, all within the sas code.

My business use SecureZip and not WinZip... please can you help with an example?

Thank you

Jay

Yuriy2301
Calcite | Level 5
also code runs succesfully but nothing happens..
Peter_C
Rhodochrosite | Level 12
> then I send this file with FILENAME EMAIL statement,
> that's why I need data to be encrypted.

why make SAS work so hard ? 😉

> maybe there is another way to encrypt data for
> sending through email?

how about PGP encryption?
This supports just the message transfer and not what happens after the message is opened by the receiver..
Your system and security administrators should be able to show how it is integrated in your environment - It might need no SAS code changes.

luck
peterC

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 3779 views
  • 0 likes
  • 5 in conversation