BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vnreddy
Quartz | Level 8
filename target "/sas/base.sas7bdat";
filename fromzip ZIP "/sas/base.sas7bdat.gz" GZIP;

data _null_;
	infile fromzip lrecl=256 recfm=F length=length eof=eof unbuf;
	file target lrecl=256 recfm=N;
	input;
	put _infile_  $varying256. length;
	return;
  eof:
    stop;
run;

Hi,

I am trying to unzip base.sas7bdat.gz file by using above script. 

Unfortunately, i end up with below errors:


ERROR: Error in the FILENAME statement.
ERROR 23-2: Invalid option name GZIP.

 

ERROR: No logical assign for filename FROMZIP.

Could someone help me with this issue.

I am using SAS EG V7.11

 

Thanks,

vnreddy

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
You'll have to talk to your IT team then about a different option - either upgrade to a later version, M5 is about 4 years old now, or allow you to pass system commands or they may require you to do it externally, outside of SAS.

View solution in original post

5 REPLIES 5
Reeza
Super User
Please verify your SAS version, not EG. GZIP support was added quite late 9.4M5+, so I suspect your version doesn't support it.
Your code looks correct per https://blogs.sas.com/content/sasdummy/2017/10/10/reading-writing-gzip-files-sas/

You can verify your version with the following:

proc product_status;run;
vnreddy
Quartz | Level 8
It's :
For Base SAS Software ...
Custom version information: 9.4_M4
Image version information: 9.04.01M4P110916
Reeza
Super User
Unfortunately that version does not support GZIP. If you have XCMD enabled you can use your OS to unzip the software as a workaround.
vnreddy
Quartz | Level 8
I just tried :
PROC OPTIONS OPTION=XCMD VALUE;
RUN;
SAS (r) Proprietary Software Release 9.4 TS1M4
Option Value Information For SAS Option XCMD
Value: NOXCMD
Scope: SAS Session
How option value set: Site Administrator Restricted
Reeza
Super User
You'll have to talk to your IT team then about a different option - either upgrade to a later version, M5 is about 4 years old now, or allow you to pass system commands or they may require you to do it externally, outside of SAS.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 5 replies
  • 6684 views
  • 1 like
  • 2 in conversation