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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 5317 views
  • 1 like
  • 2 in conversation