As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Difference between revisions of "Tips:Using the ZIP engine to read zip files"

From sasCommunity
Jump to: navigation, search
m
Line 28: Line 28:
 
<!-- Please do not edit below this line, EXCEPT when promoting a tip -->
 
<!-- Please do not edit below this line, EXCEPT when promoting a tip -->
 
<div style="float:right">Submitted By Sridevi Chandrasekaran</div>
 
<div style="float:right">Submitted By Sridevi Chandrasekaran</div>
[[Category:Tip to be Reviewed]]
+
[[Category:Tip Ready]]

Revision as of 20:27, 14 August 2015

*Sample SAS Program;
filename in saszipam 'c:\test.zip';
data _null_;
infile in(test.log);
input ;
put _infile_;
if _n_>10 then
stop ;
run;

A currently undocumented 'filename engine' is available in SAS 9 that can be used to read from compressed ZIP files directly. You simply specify the engine “SASZIPAM” on a filename statement, and then specify the file within the ZIP file that you wish to read. In the example shown, “test.zip” contains a number of files. We read “test.log” by specifying “in(test.log)”, where “in” is the libref and “test.log” is the file to be read from the zip file.

....read more

Submitted By Sridevi Chandrasekaran