Hello,
I would like to unzip a file via
%let filename = file.bz2;
%let b = D:\rawdata\zipped\&filename;
filename pipedir pipe %sysfunc(quote(D:\7ZipStandalone\7za.exe e "&b" -y -so));
Data mydat;
Infile pipedir;
file "D:\rawdata\zipped\unzippedfile.log";
input;
put _infile_;
run;
This works so far. A problem arises, if the folder name contains white space.
So if the path changes to "D:\7Zip Standalone\7za.exe" the code no longer works.
I tried using the quote, unquote and str functions (also macro versions '%') so far without success.
Thanks for helping!
This caused issues for me. I had IT create a environmental variable (with no spaces). A colleague suggested that I use PROGRA~1 instead of writing the full path: https://communities.sas.com/t5/SAS-Programming/Windows-and-pipe-with-spaces-in-the-path-file-name/m-....
HTH,
Kevin
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.