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 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 24 Apr 2007 14:36:58 -0500
Reply-To:     Jane <program.sas@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jane <program.sas@GMAIL.COM>
Subject:      Re: question about data step
Comments: To: "Huang, JS" <Huang.JS@principal.com>
In-Reply-To:  <B89C5B3C26FDEF4CA2BCBFAFC411AF8202ECB168@PFGDSMMBX015.principalusa.corp.principal.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Thanks all. The problem had been solved by array

Jane

On 4/24/07, Huang, JS <Huang.JS@principal.com> wrote: > > I misred the question in the last response. Here is the correction. > All2 represents whether all var1-var50 are 2 or not. > > VarArray(*) var1-var50; > All2=1; > do i=1 to dim(VarArray); > if VarArray(i) ne 2 then do; > All2=0; > leave; > end; > end; > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Jane > Sent: Tuesday, April 24, 2007 1:40 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: question about data step > > Hi, > > I have a dataset with variable var1 var2....var50 > > I want to test if all var* have value equal to 2. How can I use a simple > equation to test instead of use fifty "if...then" to do this work > > Thanks > > Jane > > > -----Message Disclaimer----- > > This e-mail message is intended only for the use of the individual or > entity to which it is addressed, and may contain information that is > privileged, confidential and exempt from disclosure under applicable law. > If you are not the intended recipient, any dissemination, distribution or > copying of this communication is strictly prohibited. If you have > received this communication in error, please notify us immediately by > reply email to Connect@principal.com and delete or destroy all copies of > the original message and attachments thereto. Email sent to or from the > Principal Financial Group or any of its member companies may be retained > as required by law or regulation. > > Nothing in this message is intended to constitute an Electronic signature > for purposes of the Uniform Electronic Transactions Act (UETA) or the > Electronic Signatures in Global and National Commerce Act ("E-Sign") > unless a specific statement to the contrary is included in this message. > > While this communication may be used to promote or market a transaction > or an idea that is discussed in the publication, it is intended to provide > general information about the subject matter covered and is provided with > the understanding that The Principal is not rendering legal, accounting, > or tax advice. It is not a marketed opinion and may not be used to avoid > penalties under the Internal Revenue Code. You should consult with > appropriate counsel or other advisors on all matters pertaining to legal, > tax, or accounting obligations and requirements. >


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