Date: Thu, 1 Nov 2007 13:43:41 -0500 "data _null_," "SAS(r) Discussion" "data _null_," Re: how to read gzip file in SAS To: wraong <5ac3d2950711011136x1f363c36o78b88eccb40de40d@mail.gmail.com> text/plain; charset=ISO-8859-1

What happened to access method, PIPE.

On 11/1/07, wraong <wrong.wang@gmail.com> wrote: > I turned "/" to "\". The new filename is: > > filename hhafixed '"C:\Program Files\GnuWin32\bin\gunzip" -c > C:\SEERMEDICARE\disk1\hhasaf91.txt.gz'; /*reading in > a zipped file*/ > > Following is what I got from SAS log. > > > > NOTE: The infile HHAFIXED is: > > File Name=C:\Program Files\GnuWin32\bin\gunzip, > > > > File List=('C:\Program Files\GnuWin32\bin\gunzip' 'C:\Documents and > Settings\rw247\ -c > > C:\SEERMEDICARE\disk1\hhasaf91.txt.gz'), > > RECFM=V,LRECL=374 > > > > ERROR: A component of C:\Documents and Settings\rw247\ -c > > C:\SEERMEDICARE\disk1\hhasaf91.txt.gz is not a > directory. > > FATAL: Unrecoverable I/O error detected in the execution of the data step > program. > Aborted during the EXECUTION phase. > NOTE: 3 records were read from the infile HHAFIXED. > The minimum record length was 9. > The maximum record length was 48. > NOTE: The SAS System stopped processing this step because of errors > WARNING: The data set WORK.HHA may be incomplete. When this step was > stopped there were 2 > observations and 78 variables. > WARNING: Data set WORK.HHA was not replaced because this step was stopped > > > > > On 11/1/07, data _null_, <datanull@gmail.com> wrote: > > Do you need to turn the separators around /(slash) to \(backslash). > > > > On 11/1/07, wraong < wrong.wang@gmail.com> wrote: > > > The filename statement I used: > > > > > > filename hhafixed pipe '"C:/Program Files/GnuWin32/bin/gunzip" -c > > > C:/SEERMEDICARE/disk1/hhasaf91.txt.gz'; /*reading in a > > > zipped file*/ > > > > > > And related SAS log: > > > 'C:/Program' is not recognized as an internal or external command, > operable > > > program or batch file > > > > > > > > > > > > On 11/1/07, data _null_, < datanull@gmail.com> wrote: > > > > show the FILENAME statement again. > > > > > > > > On 11/1/07, wraong <wrong.wang@gmail.com > wrote: > > > > > No, double quotes around the path still does not work. > > > > > > > > > > SAS still said: > > > > > 'C:/Program' is not recognized as an internal or external command, > > > > > operable program or batch file > > > > > > > > > > I installed gzip-1.3.12. Did I install the right program? > > > > > > > > > > Thanks. > > > > > > > > > > > > > > > On 11/1/07, data _null_, <datanull@gmail.com> wrote: > > > > > > filename hhafixed pipe '"C:\Program Files\GnuWin32\bin\gunzip" -c > > > > > > C:\SEERMEDICARE\disk1\hhasaf91.txt.gz'; > > > > > > > > > > > > Path contains a space, need to be double quoted for Winders. I > added > > > > > > double quotes around the path above. See if that works. > > > > > > > > > > > > On 11/1/07, wraong <wrong.wang@gmail.com > wrote: > > > > > > > Hi, > > > > > > > I changed filename command as: > > > > > > > > > > > > > > > > > > > > > filename hhafixed pipe 'C:\Program Files\GnuWin32\bin\gunzip -c > > > > > > > C:\SEERMEDICARE\disk1\hhasaf91.txt.gz'; > /*reading > > > in a > > > > > > > zipped file*/ > > > > > > > > > > > > > > Then SAS said > > > > > > > 'C:\Program' is not recognized as an internal or external > command, > > > > > operable > > > > > > > program or batch file. > > > > > > > > > > > > > > I tried Start-Run-C:\Program Files\GnuWin32\bin\gunzip , the > file > > > can be > > > > > > > open by gzip.exe. > > > > > > > > > > > > > > What else should I do? > > > > > > > > > > > > > > Thanks. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 11/1/07, data _null_, <datanull@gmail.com > wrote: > > > > > > > > I think Howard was saying to debug your CALL to Gzip. I > expect > > > you > > > > > > > > just need to call it with the full path. C:\your file > path\gunzip > > > > > > > > > > > > > > > > open a DOS box to test > > > > > > > > > > > > > > > > On 11/1/07, wraong <wrong.wang@gmail.com > wrote: > > > > > > > > > Hi, Howard, > > > > > > > > > > > > > > > > > > How to debug gunzip? > > > > > > > > > > > > > > > > > > Install *GNU Tar* and *GNU GZip* for Windows. Added > "C:\Program > > > > > > > > > Files\GnuWin32\bin" to my Path System variable by going to > > > Control > > > > > > > Panel--> > > > > > > > > > System Properties --> Advanced Tab--> Environment Variables > > > > > > > > > > > > > > > > > > Did I added wrong path? > > > > > > > > > > > > > > > > > > Thanks. > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > Rong > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 11/1/07, Howard Schreier <hs AT dc-sug DOT org> > > > > > <nospam@howles.com> > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > On Thu, 1 Nov 2007 12:21:58 -0400, wraong < > > > wrong.wang@GMAIL.COM> > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > >Hi,all, > > > > > > > > > > > > > > > > > > > > > >I need to read gzipped files. I tried with filname > command > > > as > > > > > > > bellow: > > > > > > > > > > > > > > > > > > > > > >filename medpar pipe 'gunzip -c > > > > > > > E:\seer_med\200501\medpar91.txt.gz'; > > > > > > > > > > >/*reading in a zipped file*/ > > > > > > > > > > > > > > > > > > > > > >In the log file, it said "'gunzip' is not recognized as > an > > > > > internal > > > > > > > or > > > > > > > > > > >external command, > > > > > > > > > > >operable program or batch file." > > > > > > > > > > > > > > > > > > > > > >How can I solve the problem? > > > > > > > > > > > > > > > > > > > > > >Thanks for kind help. > > > > > > > > > > > > > > > > > > > > > >Best, > > > > > > > > > > >Rong > > > > > > > > > > > > > > > > > > > > I don't think it's a SAS problem. Debug your GUNZIP > invocation > > > > > from a > > > > > > > host > > > > > > > > > > OS command line. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >

Back to: Top of message | Previous page | Main SAS-L page