SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

ftp issue with zip files in SAS

Reply
PROC Star
Posts: 325

ftp issue with zip files in SAS

Hi all,


I have created a .txt file and did .gz . After that used filename ftp statement
ftp was succesfull. but  I am not able to unzip on other server. Please help

 

Thanks

Kiran

Super User
Posts: 19,770

Re: ftp issue with zip files in SAS

This doesn't really sound like a SAS issue...where is SAS coming in to play?

PROC Star
Posts: 325

Re: ftp issue with zip files in SAS

[ Edited ]

I agree.  did anyone of had same problem, please suggest

Super User
Posts: 19,770

Re: ftp issue with zip files in SAS

Then again it really doesn't sound like a SAS issue. Even if you use SAS for FTP it's likely using an external app via a system command. 

 

Whats the error unzipping?

PROC Star
Posts: 325

Re: ftp issue with zip files in SAS

I agree. no error and file does not gets unzipped.

Super User
Posts: 19,770

Re: ftp issue with zip files in SAS

In these situations you need to get your system commands correct and then use SAS to execute them. That first step is vital. 

Super Contributor
Posts: 394

Re: ftp issue with zip files in SAS

Make sure you use a binary mode ftp. If you use text mode it will corrupt the zip file.

PROC Star
Posts: 325

Re: ftp issue with zip files in SAS

Thanks. it is alreasy in binary mode.

Super User
Posts: 19,770

Re: ftp issue with zip files in SAS

Please post your code.

 

Have you confirmed that it works via system commands?
Your server also has gzip? SAS doesn't provide a zip utility. If you use winzip you don't need to unzip the file...

PROC Star
Posts: 325

Re: ftp issue with zip files in SAS

This is for my colleague and he is trying the system commands. Our system has gzip.

Super User
Posts: 11,343

Re: ftp issue with zip files in SAS

[ Edited ]

You'll likely be better off unzipping the file after ftp to local computer and then read the results. If you do not have WINZIP then reading the zipped file will fail as far as I know.

PROC Star
Posts: 325

Re: ftp issue with zip files in SAS

he used below link 

http://support.sas.com/kb/25/211.html

 

Super User
Posts: 19,770

Re: ftp issue with zip files in SAS

That's nice. It still doesn't help illustrate what code he actually used.

 

And again, those are system commands. Verify your system commands first, then pass them to SAS. 

Respected Advisor
Posts: 4,173

Re: ftp issue with zip files in SAS

[ Edited ]

So from what you tell us:

1. zipping in the source system works

2. sending the zipped file via FTP works and the target system receives the zipped file

3. unzipping in the target environment doesn't work.

 

What you need to do is a bit of an analytical approach to get to the point where something goes wrong.

 

Questions:

a. once you've zipped your file in the source environment: can you unzip it again in the source environment?

b. have you tried to simply ftp the file via command prompt ftp commands (without any SAS involved)? 

c. WHAT does not work for unzipping? There is no tool available to do the job? Or you get an error message when trying to unzip? Or you can unzip but then the content is "garbled"?

d. What's the source OS (Unix, Windows, ...) and what's the target OS?

e. Which tool/software are you using in the target environment for unzipping? If you can try 7-zip as it deals with quite a number of different archive formats. 

PROC Star
Posts: 325

Re: ftp issue with zip files in SAS

Hi All,

 

Thanks for all your replies. My colleague found a custom macro which was built by one of the team member and that has worked for him.

 

Thanks

 

Ask a Question
Discussion stats
  • 14 replies
  • 570 views
  • 2 likes
  • 5 in conversation