I have a data file and code to read it in, but my company's servers are structured quite a bit differently than those at the company where the text file and sas program originated, so I have to adapt the code to work within our system. The data came to me in a zipped text file ("filename.txt.gz") because it's so enormous. It lives on a Linux server with SAS Grid capabilities and I link-in remotely to the Linux server from my Windows machine to access the data. I can do this interactively in SAS EG or I can batch submit programs to the SAS Grid/Linux server using bash code. Complicating matters, of course, is that the data is so large that it's been broken into several txt.gz files: filename1.txt.gz, filename2.txt.gz, etc. The SAS program I received to access the data say this: FILENAME inmyfile PIPE 'gunzip -c /directory/filename.txt.gz';
DATA work.tempsasdata;
INFILE inmyfile LRECL=4502 MISSOVER PAD;
INPUT
@@0001 var1 $char11
@0012 var2 $char1.
@@0013 var3 $char1.
(and so on)
;
RUN; When I run a PROC CONTENTS on my resulting dataset, "tempsasdata," I see that it has all the right variables formatted exactly as the code intends, but the data isn't correctly input and there are only 1 or 2 obs, depending on the different adjustments I've tried in troubleshooting this. There should be over 200,000... (The #4502 comes from the original code and is data-specific, so I'm not worried about that piece) Code edits I've tried that haven't worked: (1) FILENAME inmyfile PIPE 'gunzip -c /linux_path/filename.txt.gz'; (2) FILENAME inmyfile PIPE 'gunzip -c //linux_path/filename.txt.gz'; (3) X "cd /linux_path/";
FILENAME inmyfile PIPE 'gunzip -c /filename.txt.gz'; (4) X "cd /linux_path/";
FILENAME inmyfile PIPE 'gunzip -c filename.txt.gz'; (5) X "cd /linux_path/";
FILENAME inmyfile PIPE 'gunzip -c /directory/filename.txt.gz'; For all of these, I've been trying them interactively in SAS EG and not through batch submitting in PuTTY. I know my linux_path is correct because I don't get an error code on that line and I've used the X "cd "/linux_path/"; approach before successfully with other data on other projects. It's the zipped piece (or possibly the filename deliniation (filename1, filename2, filenameX, and so on) that is causing me problems here, yet other posts relating to gunzipped files, haven't been helpful thus far. (Unfortunately I can't provide a data sample or more detailed filenames/paths because it's all very sensitive data and everything else is proprietary...) Not sure what else to try or how to make this work. All ideas/theories/code appreciated!
... View more