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 (September 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 1 Sep 2003 08:11:40 -0400
Reply-To:     Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject:      Re: Simple question
Content-Type: text/plain; charset=ISO-8859-1

Hi, I think I do not fully understand the structure. What is the d1-d61? Variables? Observations? The code seems like that are variables. Anyway you cannot work with a macrovariable as index in that way. What you can do, is to create a ARRAY:

array x(*) d1-d61;

that you can test with:

do i=1 to dim(x); if x(i)<=-2 or x(i)>=2 then output; end;

On Mon, 1 Sep 2003 13:35:25 +0200, Adelina Gschwandtner <adelina.gschwandtner@UNIVIE.AC.AT> wrote:

>Hello Everybody! > >I have the following problem. I have a dataset composed like this: > >type d1 d2 d3..................................d61 >t 0.1 -2 0.3................................. 4 > >and I just want the observations were t<=-2 or t>=4. So I want to have: > >type d2......d61 >t -2 4 > >How do I do this? > >I tried something like this: > >data new9; >set new8; >do i=1 to 61; > if d&_i ge 2 or d&_i le -2 then; >end; >run; > >but it did not work! > >Please help! > >Thanks, >Adelina. >?º°`°º?ø,??,ø?º°`°º?ø,??,ø?º°`°º?ø,??,ø?º°`°º?ø?º°`°º?ø,??,ø > >ADELINA GSCHWANDTNER DR. > >University of Vienna >Department of Economics >BWZ, Bruennerstr.72 Tel:(00431) 4277 37480 >A-1210 Vienna Fax:(00431) 4277 37498 > >Adelina.Gschwandtner@univie.ac.at > >http://www.univie.ac.at/Wirtschaftswissenschaften/gschwand/ > >?º°`°º?ø,??,ø?º°`°º?ø,??,ø?º°`°º?ø,??,ø?º°`°º?ø?º°`°º?ø,??,ø


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