DATA Step, Macro, Functions and more

Read in encrypted file in Unix

Reply
Contributor
Posts: 56

Read in encrypted file in Unix

Hi,

I need to read in a zipped encrypted file in Unix using the following filename statement:

filename inf 'gzcat /..../.zip' pass="" ;

data test;
infile inf ;
input..... ;;

run;

SAS give an invalid option error. Do anyone has any idea how to read the file into SAS without manually unencrypt/unzip the file ?

Thanks
SAS Super FREQ
Posts: 8,742

Re: Read in encrypted file in Unix

hi:
These notes have some information:
http://support.sas.com/kb/25/215.html
http://support.sas.com/kb/25/206.html

Otherwise, you might want to work with Tech Support on this question.

cynthia
Contributor
Posts: 56

Re: Read in encrypted file in Unix

Hi Cythina,

Thanks for your information. Your doc is helpful in decompression but it did not address the problem of the password issue. When the file is both compressed and encrypted, that when I have problem.

I have been to SAS support and the guy don't seem to understand my problem and after several back and forth. I finally throw in the towel and this forum is my last resource.

Any help is deeply appreciated.
Trusted Advisor
Posts: 2,113

Re: Read in encrypted file in Unix

The .zip extension tells me that the file was created on a PC and is in a flavor of WinZip format. I doubt that gzcat can read it at all, let alone unencrypt it.
Contributor
Posts: 56

Re: Read in encrypted file in Unix

I am not sure about other Unix system. But I can downlaod a gz file from unix to pc and unzip it with winzip or vice verse. I can even downlaod a .sas7bdat file in unix to pc directly without converting to the transport format and run it without any problem.
Trusted Advisor
Posts: 2,113

Re: Read in encrypted file in Unix

You can certainly bring Unix gzip'd file to the PC; both WinZip and 7Zip were designed to read them. You can also use command line processing in winzip and 7zip to read encrypted files on the PC.

However, what I read from your initial post was an interest in using Unix-based SAS and scripts to read a file that had been compressed and encrypted on a PC; that is what I was expressing doubts about.
Ask a Question
Discussion stats
  • 5 replies
  • 362 views
  • 0 likes
  • 3 in conversation