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 (August 2007, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 29 Aug 2007 09:02:10 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:      Re: Conditional PROC FREQ

On Wed, 29 Aug 2007 05:52:45 -0400, Lene Blenstrup <lenetb@SOCSCI.AAU.DK> wrote:

>Hi. > >I would like to make a simpel frequency on the year my population enters my >dataset but only if a condition is meet. >I have tried this - but it doesn't work: > >proc freq data=dataset; >tables year; >if condition=.; >run; > >I normally extract the records that meet the condition into another dataset >and then make my count... Isn't there a simpler way that saves my the trouble?! > >Lene

You can't have an IF statement in a PROC step. You can however have a WHERE statement.

Is "condition" the name of a variable, or a placeholder for an expression which is evaluated as true/false? If the latter, the result of evaluating the expression will be either zero or one, never a missing value.


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