Help using Base SAS procedures

Questions About SASZIPAM

Reply
Regular Contributor
Posts: 152

Questions About SASZIPAM

Hello

I want to be able to have many text files in one password protected WinZip file.  The format and structure of each of the files in the winzip file is exactly the same with, of course, different filenames.

The following code works for a single text file in a non-password protected zip file:

FILENAME ZIPFILE SASZIPAM 'C:\Temp\filename.zip';

data import;
infile ZIPFILE(test.txt) truncover LRECL = 5000 firstobs=2;

input    @1 Prov   $1.
   @2 Inst   $4.
   @6 Fyear   $4.
   @10 Period   $2.
   @12 Batch   $2.
   @14 AbsNo      $3.
   @18  Coder   $2.
   @20 ChartNo   $10.
   @30 RegNo   $7.
   @37 SecChartNo  $10.;
run;

When these files are in a folder, I can reference all at once by using the wildcard i.e. filename 'c:\Temp\*.txt' but I tried that in the code above and got the error message "Member *.txt does not exist".  Is there a way to reference all at once?  Also, how do I work the password into the code above?

Thanks for any and all assistance.

Contributor
Posts: 46

Re: Questions About SASZIPAM

Try to put the quotes between the file's name.

infile ZIPFILE("test.txt") truncover LRECL = 5000 firstobs=2;

Trusted Advisor
Posts: 2,113

Re: Questions About SASZIPAM

Ask a Question
Discussion stats
  • 2 replies
  • 852 views
  • 0 likes
  • 3 in conversation