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 (March 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 6 Mar 2002 14:15:26 -0600
Reply-To:   "Hapeman, David E" <hapemande@WELLMARK.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Hapeman, David E" <hapemande@WELLMARK.COM>
Subject:   Re: Happy array fun times
Comments:   To: "Cacialli, Doug" <Doug_Cacialli@URMC.ROCHESTER.EDU>
Content-Type:   text/plain; charset="iso-8859-1"

try this:

data test; datea1=1; datea2=2; datea3=3; x=4; output; run;

proc contents data=test noprint out=t_list; run;

proc sql feedback noprint;

select distinct name into :name_list separated by ' ' from t_list where name like 'datea%';

quit;

%put &name_list;

Dave Hapeman |-(:-) (515) 245-4765 hapemande@Wellmark.com

-----Original Message----- From: Cacialli, Doug [mailto:Doug_Cacialli@URMC.ROCHESTER.EDU] Sent: Wednesday, March 06, 2002 1:59 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Happy array fun times

Y'all,

I'm trying to write an array that would include all variables that have the prefix "datea" (i.e., datea1, datea2, datea3, etc.). The problem is that new datea vars will continue to be appended to the end of the data set, and while I can specify a range of vars now, it will continue to change. Does anyone have any ideas how I can account for this? TIA!

Doug out.

---------------------------------------------------------------------- Doug Cacialli - Information Analyst / Laboratory Coordinator Sleep Research Laboratory Department of Psychiatry URMC - Strong Memorial Hospital 300 Crittenden Blvd. Rochester, New York 14642 Phone - (585) 275-2900 Fax - (585) 273-3682 ----------------------------------------------------------------------


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