BookmarkSubscribeRSS Feed
iSAS
Quartz | Level 8

We zipped a dataset using:

 

- call system("gzip path/data.sas7bdat")

 

However, when we unzipped it using:

 

- call system("gzip -d path/data.sas7bdat")

 

We noticed that its size was different from before it was zipped. Does this mean that something changed in the data set? We compared it from its back up data set using proc compare though but there is no discrepancy. However, their file sizes are different. May we know the reason behind this?

 

2 REPLIES 2
Kurt_Bremser
Super User

@iSAS wrote:

We zipped a dataset using:

 

- call system("gzip path/data.sas7bdat")

 

However, when we unzipped it using:

 

- call system("gzip -d path/data.sas7bdat")

 

We noticed that its size was different from before it was zipped. Does this mean that something changed in the data set? We compared it from its back up data set using proc compare though but there is no discrepancy. However, their file sizes are different. May we know the reason behind this?

 


That wouldn't work. gzip creates

path/data.sas7bdat.gz

while

gzip -d path/data.sas7bdat

will find that the sas7bdat is not a gzipped file and would fail. Since the gzip removes the source file, there must be some process that recreated the sas7bdat. So I suggest you do a

mv path/data.sas7bdat path/data_new.sas7bdat
gzip -d path/data.sas7bdat.gz

and then do a visual compare of the size and the timestamps of data_new.sas7bdat and data.sas7bdat, as gzip preserves those during the whole process.

I've never had a change of physical filesize from gzip / gzip -d.

iSAS
Quartz | Level 8
My mistake, I mixed it up. We encountered this issue on on cport/cimport and not on gzip

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1002 views
  • 1 like
  • 2 in conversation