Chiu posted the following:
>Hi.I am new to SAS and would appreciate help in the following.
>I have exported a ".xpt" file into unix and the result is a
>".sas7bdat" file.Is there anyway of reading this .sas7bdat file in the
>unix console on my home computer? Have tried emacs and pico but I get
>gibberrish.Dont know if there is something wrong with the way I xport
>The way I xported is as follows.
> options nocenter linesize=80;
> libname one 'mydir';
> libname x xport '/home/ugrad/..../blah.xpt;
> proc copy in=x out=one;
>I telnet to my university computers to use SAS and thus have no access
>to any windows.
Chiu, I see that you have already got some excellent advice from the
ubiquitous Gerhard H.! I have a different slant on how I would proceed if I
were sitting in your chair.
I would rather chew off my left arm than attempt to run SAS in line mode on
a Unix server. (The pain would be similar, but the frustration would be
greatly diminished). Similarly, having used state-of-the-art editors, I
would rather be a contestant on Fear Factor than write SAS programs on a
Unix server with VI. So, my strategy for your particular situation would
1. Write the SAS programs on my desktop, using PC SAS (if available), or any
PC text editing package, or the standard WordPad or NotePad editors.
2. Save the SAS programs with an extension of .sas (not .txt) on my desktop.
3. FTP the SAS programs to the Unix server
4. Execute the SAS programs in batch mode on the Unix server -- saving the
.log (SAS log) and .lst (SAS reports) as separate files. Sample script:
/home/sasdir/sas /home/chiu/bigprog.sas \
-noterminal -log /home/chiu/bigprog.log \
5. Either examine the .log and .lst files online (e.g.. "more chiu.log" or
"tail chiu.lst"), or FTP them to my desktop where I could look at them in
the aforementioned editors.
Even though the above method is kind of clunky, I think that you would
probably find it manageable with some use.
Now, if you are able to map a local PC drive to your Unix server drive, via
NFS, the above procedure is greatly simplified. It is simplified, because
you wouldn't have to do the FTP-ing, but, rather, edit the programs and look
at the files on the Unix server as if they were PC files. So, you might ask
your friendly Unix Administrator or Windows Administrator if you can map
Unix drives in Windows Explorer via NFS.
Finally, if you are able to get PC SAS with SAS/CONNECT software _AND_ there
is SAS/CONNECT software installed on your Unix SAS server, everything would
be much simpler. You could create and edit your programs in interactive SAS
on the desktop, submit them to the Unix server for execution, and receive
your .lst and .log result sets in your interactive SAS session. But, that
is another story.
Chiu, there are many ways to approach the task of running SAS programs on a
Unix server without the benefit of X Windows. I'm sure that you will
quickly determine which is best for you. Best of luck in your quest to run
your SAS programs on Unix!
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not reflect
those of my organization or my associates. All SAS code and/or
methodologies specified in this posting are for illustrative purposes only
and no warranty is stated or implied as to their accuracy or applicability.
People deciding to use information in this posting do so at their own risk.
Michael A. Raithel
"The man who wrote the book on performance"
Author: Tuning SAS Applications in the MVS Environment
...knowledge is a deadly friend if no one sets the rules... - King Crimson