BookmarkSubscribeRSS Feed
Kwok
Calcite | Level 5
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
5 REPLIES 5
Cynthia_sas
SAS Super FREQ
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
Kwok
Calcite | Level 5
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.
Doc_Duke
Rhodochrosite | Level 12
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.
Kwok
Calcite | Level 5
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.
Doc_Duke
Rhodochrosite | Level 12
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.

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
  • 5 replies
  • 1157 views
  • 0 likes
  • 3 in conversation