LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 14 Feb 2006 16:05:36 -0800
Reply-To:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:   Re: DO using a set of numbers instead of 1 to n increment 1
Comments:   To: toby989@HOTPOP.COM
Content-Type:   text/plain; charset="us-ascii"

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


Back to: Top of message | Previous page | Main SAS-L page