Date: Wed, 27 Oct 2010 09:05:57 -0400
Reply-To: Andrew.Clapson@STATCAN.GC.CA
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Clapson, Andrew - PPD/DPP" <Andrew.Clapson@STATCAN.GC.CA>
Subject: Re: Forcing filename capitalization
Content-Type: text/plain; charset="us-ascii"
Hahaha, I like the example.
Actually, good points re: why NOT to do this, though. It would really
only be a minor convenience gain at most, and probably not worth going
against SAS' normal practices.
(I guess the "X" command would suffice if it was ever really necessary
for some reason.)
Thanks for the input,
Andy
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Tom
Abernathy
Sent: October 26, 2010 6:57 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Forcing filename capitalization
Andy -
I strongly recommend against it as that is not how SAS behaves
normally. Also readability is not an absolute thing. Personally mixed
case dataset names are much less readable to me. In fact they would be
almost invisible if I was scanning a directory list as they violate the
expected behavior how SAS dataset names normally appear.
If you make a dataset from SAS it will create it in all lowercase. If
you are working on Unix or other file system where you can create A.out
and a.out as two different files then allowing SAS datasets with mixed
case names could cause you and SAS no end of confusion.
That said if you really insist on this course then the only solution
that I can see is to create the data with a dummy name (such _anewds_)
and then use an operating system command to rename the file.
%let dir=c:\temp;
libname out "&dir\";
data out._anewds_;
set sashelp.class;
run;
x rename &dir\_anewds_.sas7bdat MyMiXedUPCase.sas7bdat ;
data _null_;
set out.MyMiXedUPCase;
put (_all_) (=/);
stop;
run;
On Tue, 26 Oct 2010 16:21:19 -0400, Clapson, Andrew - PPD/DPP
<Andrew.Clapson@STATCAN.GC.CA> wrote:
>Hey SAS-L,
>
>Quick question here - is there any way to output SAS datasets (or
>excel,
>etc) having names containing capitalized letters? (i.e. they would
>follow the format their name in the SAS program)
>I'm just interested in doing this for readability's sake. (I'm running
>SAS 9.1 on XP platform, fyi)
>
>Thanks,
>
>Andy