BookmarkSubscribeRSS Feed
sassygrl
Calcite | Level 5
I have several datasets stored in a zip file. Usually I unzip the datasets and place them into my library, and read them in through the library reference. Is there a way to access the zipped files directly through SAS?

I tried the following code:

filename in saszipam 'C:\SAS_2008_01_02.zip' ;

data follow;
infile in(follow.sas);
run;


And got the following error message in my log:

ERROR: Read Access Violation In Task [ DATASTEP )
Exception occurred at (62A22BE2)
Task Traceback
Address Frame (DBGHELP API Version 4.0 rev 5)
62A22BE2 057CFC18 saszipam:mcn_main+0x1BE2
62A22F6F 057CFCE4 saszipam:mcn_main+0x1F6F
67990076 057CFD20 sasxkern:mcn_main+0x3F076
6723F48A 057CFECC sasdsx:mcn_main+0xE48A
6723EE73 057CFEF8 sasdsx:mcn_main+0xDE73
6723142A 057CFF3C sasdsx:mcn_main+0x42A
673115B0 057CFF88 sasds:mcn_main+0x5B0
67E228F2 057CFFA0 sashost:Main+0xBE72
67E26A00 057CFFB4 sashost:Main+0xFF80
7C80B683 057CFFEC kernel32:GetModuleFileNameA+0x1B4

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.FOLLOW may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.FOLLOW was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.77 seconds
cpu time 0.06 seconds


Thank you!!
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
You can read raw data from WinZip files. See
http://support.sas.com/kb/26/011.html . This uses the PIPE option which still requires disk storage, but it is immediately deleted.

Similarly, this SUGI paper has examples
http://www2.sas.com/proceedings/forum2007/005-2007.pdf , though it extracts the files to temporary storage.

I doubt that you can read SAS datasets (.sas7bdat extensions) that way because they need to be direct access.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2289 views
  • 0 likes
  • 2 in conversation