Date: Sun, 5 Nov 2006 22:32:53 -0800
Reply-To: David L Cassell <davidlcassell@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David L Cassell <davidlcassell@MSN.COM>
Subject: Re: OT: Chance to Make SAS-L History: Did You Know That...
In-Reply-To: <889CFD77BD70DD4BAA172899250737E901CB43EE@MAILBOXFIVE.home.ku.edu>
Content-Type: text/plain; format=flowed
Didja know that:
In addition to the
var1-var9
style of variable lists and the
onevariable --anothervariable
style of variable lists, that you can say:
v:
and get all the variables in the data set which start with V?
Or you can say:
arc:
and get all the variables in the data set which start with 'arc'?
And didja know that people stumble on this one a lot because
they forget this covers everything wit that starting letter
sequence?
If you have variables D1-D11 and D31-D41, along with variables
debt and profit and margin and trade, then what do you get with:
d:
Well, you get D1-D11 and D31-D41, but you also get DEBT
which starts with 'D' but is hiding somewhere else in the
data set. So it's extremely useful, but easy to trip over.
Or try this:
data temp1;
retain d1-d9 42;
do i = 1 to 10; output; end;
run;
data temp2;
array a{*} d: ;
put a{4};
run;
Now look at the error messages. SAS cannot build that array
until it has read in the data set TEMP1, because it has to parse
through TEMP1 to find the variables matching that list descriptor.
So here's another way in which var: is likely to cause problems.
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330
_________________________________________________________________
Find a local pizza place, music store, museum and more…then map the best
route! http://local.live.com?FORM=MGA001