|
Toby - with a macro -
proc sql noprint;
select distinct(keyvar)
into :list separated by ","
from data.set (keep=keyvar)
order by keyvar;
quit;
data test;
do i = &list;
output;
end;
run;
hth
Paul Choate
DDS Data Extraction
(916) 654-2160
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> toby989@HOTPOP.COM
> Sent: Tuesday, February 14, 2006 3:50 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: DO using a set of numbers instead of 1 to n increment 1
>
> Hi All
>
> Does on know how i can let an iterative do statement use numbers in a
> set (i e the unique sorted id of one of my sas datasets) to loop
though
> instead of using the counter 1 to n?
>
> Probably ndependent form the question above, can I use the iterative
do
> outside (/without defining) a macro?
>
> Thanks.
>
> Toby
|