BookmarkSubscribeRSS Feed
SYN
Obsidian | Level 7 SYN
Obsidian | Level 7

Hi All,

I have one .gz file in unix server location /aaa/dddd/ssss/file.gz

file.gz having .csv file inside.

Can any one provide me the command to gzip this file use in DI studio 3.4 job. Thanks in advance.

Sreenivasa
3 REPLIES 3
LinusH
Tourmaline | Level 20

gzip files are unzipped with the gunzip UNIX command.

You can call it in the pre-code of the job using the X statement (make sure that AllowXCommand is set in the workspace/batch server).

Data never sleeps
SYN
Obsidian | Level 7 SYN
Obsidian | Level 7

Thank you for the valuable suggetion LinusH.

I have given below code in job preprocess, job successful however file not uncompressed.

Please advise. Thanks in advance.

/* Access the data library */
LIBNAME xxx  "/aaa/dddd/ssss/file.gz" ;
%rcSet(&syslibrc);

/* gunzip file */
x gunzip "file.gz";

Sreenivasa
LinusH
Tourmaline | Level 20

The X statement does not unfortunately give a returnrn code.

If you are using the filename file pipe "gunzip file.gz"; you will be able to see the return code when called from a data step.

I don't that the file name should have any quotation...?

And, are you sure that the file resists in the current directory on the server?

Data never sleeps

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
  • 3 replies
  • 1222 views
  • 0 likes
  • 2 in conversation