Hi every one .... please help me to use .gz file attached along with this.
i need to use it by infile and i am working on windows
please help me
my code is
filename hhh pipe "zcat filepath\test.txt.gz";
data test;
infile hhh firstobs = 2 expandtabs truncover;
input @1 dd1 yymmdd10.
@17 dd2 yymmdd10.
@33 act $1.
@41 udu 1.
@49 LC $5.
@57 cs $3.
@65 sc $3.
@73 div 1.
@81 vol;
format dd1 dateto date9.;
area=trim(left(lc));
if lc=' ' then error 'NO AREA LISTED';
run;
Log window:
Stderr output: 'zcat' is not recognized as an internal or external command, operable program or batch file. NOTE: 0 records were read from the infile HHH. NOTE: The data set WORK.TEST has 0 observations and 9 variables. NOTE: DATA statement used (Total process time): real time 0.06 seconds cpu time 0.04 seconds
If the zipping tool you want to use is 7zip then you need also to use the syntax for 7zip (zcat is Gzip syntax).
May be this will help you: http://www2.sas.com/proceedings/sugi31/155-31.pdf
Hello,
In filename, you can use PIPE to handle it.
Is gzip installed on your Windows machine? Or any other zipping tool like 7zip?
Whatever you're using I doubt that you just can call the tool using "zcat". In order for Windows to find it you must provide a path (absolute or relative) - or 'cd' to the directory where the executable "lives".
May be below links will help:
In SAS 9.4 you can use the FILENAME statement, ZIP access method for this.
Chris
yes 7zip installed on my machine... still havining error
Stderr output:
'zcat' is not recognized as an internal or external command,
operable program or batch file.
NOTE: 0 records were read from the infile WANTED.
NOTE: The data set WORK.TEST has 0 observations and 9 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.00 seconds
If the zipping tool you want to use is 7zip then you need also to use the syntax for 7zip (zcat is Gzip syntax).
May be this will help you: http://www2.sas.com/proceedings/sugi31/155-31.pdf
I run your code under SAS 9.2. It works !
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.