BookmarkSubscribeRSS Feed
greesamu
Obsidian | Level 7

So I've uploaded plenty of .sas7dbat files with no issue, but for the first time I have one that's over 1 GB (it's 1.1 GB). I've been able to zip it and then upload the zipped file, but now I can't figure out how to unzip the file now that it's in SAS Studio.

 

I'd appreciate advice on how to unzip the file or some way to split it into two smaller files. Thanks!

4 REPLIES 4
AllanBowe
Barite | Level 11

Here's a macro to do the unzip: https://core.sasjs.io/mp__unzip_8sas.html

/Allan
MacroCore library for app developers
Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
Tom
Super User Tom
Super User

Just to spell it out.

Point a fileref at the file inside the ZIP file.

Point another at the place you want to store the SAS dataset.

Use FCOPY() to extract the file.

 

You need to use RECFM=F and set a specific LRECL value to force BINARY copy.

filename in zip "myfile.zip" member='myds.sas7bdat' recfm=f lrecl=512;
filename out "/mydirectory/myds.sas7bdat" recfm=f lrecl=512;
%let rc= %sysfunc(fcopy(in,out));

If you want the file created in the WORK directory use the PATHNAME() function to find out where that is for this session.

filename out "%sysfunc(pathname(work))/myds.sas7bdat" recfm=f lrecl=512;
Reeza
Super User
If you need to work with large data sets, you can also use filename URL to access data sets on public sites and a similar method to Tom's solution to copy them over from a cloud site to your SAS On Demand session.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 4 replies
  • 2566 views
  • 3 likes
  • 4 in conversation