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
This doesn't really sound like a SAS issue...where is SAS coming in to play?
I agree. did anyone of had same problem, please suggest
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?
I agree. no error and file does not gets unzipped.
In these situations you need to get your system commands correct and then use SAS to execute them. That first step is vital.
Make sure you use a binary mode ftp. If you use text mode it will corrupt the zip file.
Thanks. it is alreasy in binary mode.
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...
This is for my colleague and he is trying the system commands. Our system has gzip.
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.
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.
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.
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
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!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.