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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 809 views
  • 1 like
  • 2 in conversation