Date: Wed, 6 Mar 2002 15:06:04 -0500
Reply-To: "Dorfman, Paul" <Paul.Dorfman@BCBSFL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Dorfman, Paul" <Paul.Dorfman@BCBSFL.COM>
Subject: Re: Happy array fun times
Content-Type: text/plain; charset=iso-8859-1
Doug,
This should give you a clear idea:
data a ;
retain datea1 1 dateab 2 datea45 3 datea_ 4 ;
run ;
data _null_ ;
set a ;
array datea(*) datea: ;
put 7*'-' / datea(*) ;
run ;
-------
1 2 3 4
Note that the array definition should follow the SET. BTW, what do you mean
by "new datea vars will continue to be appended to the end of the data set"?
Which end? Did you mean "the data set will continue to be altered by adding
new datea: variables"?
Kind regards,
=====================
Paul M. Dorfman
Jacksonville, FL
=====================
> -----Original Message-----
> From: Cacialli, Doug [mailto:Doug_Cacialli@URMC.ROCHESTER.EDU]
> Sent: Wednesday, March 06, 2002 2: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
> ----------------------------------------------------------------------
>
>
Blue Cross Blue Shield of Florida, Inc., and its subsidiary and
affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc.
|