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 (April 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 17 Apr 1999 14:06:46 GMT
Reply-To:     Andreas Grueninger <grueni@STUTTGART.NETSURF.DE>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Andreas Grueninger <grueni@STUTTGART.NETSURF.DE>
Organization: LF.net GmbH, Internet Services, Stuttgart, Germany
Subject:      Re: Creat new variable according to value of another variable

On Fri, 16 Apr 1999 02:42:22 GMT, yxz11@new-york.crosswinds.net (Yu Zhang) wrote:

>Hi there, > >I got a question that I want to creat a bunch of variables according >to the value of another variable. What I want is: > >q1 > >18 >19 >18 >20 >1 > >then I wnat something like: > >q1 an1 an18 an19 an20 >18 . 1 . . >19 . . 1 . >18 . 1 . . >20 . . . 1 >1 1 . . . > >If possible I'd liek to have 0 in place of '.'. > %LET name=q1; data b; ARRAY an&name(20); ARRAY sean&name(20); DO _i_=1 TO DIM(an&name); an&name(_i_) = 0; sean&name(_i_) = 0; END; INPUT &name; an&name(&name) = &name; sean&name(&name) = &name; cards; 18 19 18 20 1 ; RUN;

--------------------------- Andreas Grueninger PRIVATE: grueni@stuttgart.netsurf.de OFFICE: grueninger@lfl.bwl.de ---------------------------


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