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!
This post shows how to unzip a SAS data set and work with it.
Here's a macro to do the unzip: https://core.sasjs.io/mp__unzip_8sas.html
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;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: