| Date: | Sun, 28 Jul 1996 21:51:31 -0400 |
| Reply-To: | SFBAY0001 <sfbay0001@aol.com> |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | SFBAY0001 <sfbay0001@AOL.COM> |
| Organization: | America Online, Inc. (1-800-827-6364) |
| Subject: | Re: Reading a SAS file |
|---|
looks like a little misunderstanding about use of the LIBNAME statement is
causing the problem. Assume I have a directory on my PC called ANDREW
there are several SAS data sets in this directory (and, for the sake of
argument, some Excel spreadsheets, Powerpoint presentations and word
documents). For our purposes, the SAS data sets are ONE.ssd, TWO.ssd and
THREE.ssd
The LIBNAME statement points to a physical file location containing one or
more SAS datasets. The name of the LIBNAME (see below) acts as a "handle"
which allows the user to access _all_ the SAS data sets in the library.
You _don't specify_ the file extension (i.e,, the "ssd" or "sd2") in the
libname statement.
Using my example above, here is a LIBNAME statement which would make the
SAS data sets in directory ANDREW available to me for use in a SAS
program:
LIBNAME MYFILES 'C:\Andrew';
having assigned LIBREF MYFILES to the SAS data library ANDREW, I can go to
work.
Here is an example:
PROC FREQ DATA=MYFILES.ONE;
TABLES INC * SEX/EXPECTED;
RUN;
I hope this helps!
****************************************
Andrew H. Karp
Sierra Information Services: Solutions Using the SAS System
A SAS Institute Quality Partner in the United States of America
1489 Webster Street #1308
San Francisco, CA 94115
415/441-0702 (voice)
415/441-9175 (fax)
SFBAY0001 @ AOL.COM
|