05-05-2015 04:49 PM
First I downloaded the Gzip:
Gzip for Windows => downloaded: Complete package, except sources
1) In the command prompt:
"C:\Users\sbrpac>"C:\Program Files (x86)\GnuWin32\bin\gzip" -cd "C:\data.csv.gz"
Returned only the first row of the csv only (column names), even though when I open the csv it has more than 1,000 rows.
2) In SAS
%let dir=C:\"Program Files (x86)"\GnuWin32\bin\gzip;
Data result_data ;
filename file2 pipe %unquote(%str(%'&dir -cd &file1%'));
infile file2 dlm="|" LRECL=32767 truncover dsd firstobs=2;
Returned an empty table.
Do you know what might have I done wrong?
05-05-2015 06:23 PM
Have you tried it without all of the macro variables and quoting functions? As in typing all of the file name without them.
The filename line generated resolves to :
filename file2 pipe 'C:\"Program Files (x86)"\GnuWin32\bin\gzip -cd "C:\data.csv.gz"'
Which has perhaps too many quotes.
You can submit the filename as a separate statement from the data step and see if you get a successful assignment.