Date: Fri, 12 Jun 2009 11:37:19 -0700
Reply-To: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Subject: Re: Dynamic name for SAS Dataset in Version 9.2
Content-Type: text/plain; charset=ISO-8859-1
On Jun 11, 9:55 pm, stats...@GMAIL.COM (OR Stats) wrote:
> Hello SAS:
> I have 9.2 installed and getting an error that I did not encounter in 9.1.
> Before, when I write a macro
> LIBNAME mydir 'C:\Documents and Settings\';
> %maco mymac(name);
> DATA mydir.tab&name;
> %mend mymac;
> Before, it would create a table called t a b m y n a m e in the
> library m y d i r . But now, in the logs, it tries to create two
> tables, one called t a b and the other called m y n a m e in m
> y d i r .
> How do I get SAS 9.2 to create just one table called tabmyname. Where the
> 'myname' is picked up from a macro variable that I introduce as input in my
> macro function?
Testing this brought up an interesting observation.... In windows,
using a literal for the table name has these effects.
1. a libref WC00000n is created to correspond to the current folder
(as shown in the status bar)
2. a single level table name can be used to reference files in the
create a table in WORK:
create a table in current folder
I suspect the same is true in Unix, however, case sensitivity may be
enforced on the table name (i.e. 'foo' and 'Foo' might be different
Furthermore, when using a single level name literal, the created table
is in WORK!
Richard A. DeVenezia