|
Hi David,
In your last example you didn't read (SET) dataset Temp1 at all while
creating Temp2, so an error is inevitable. But I think you wanted to show
the example with a SET statement just _after_ the ARRAY statement. Then the
comment you gave applies I think. Did you intend it that way?
Regards - Jim.
--
Jim Groeneveld, Netherlands
Statistician, SAS consultant
home.hccnet.nl/jim.groeneveld
On Sun, 5 Nov 2006 22:32:53 -0800, David L Cassell <davidlcassell@MSN.COM>
wrote:
>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
|