01-30-2013 10:36 AM
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';
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.;
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.