LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 19 Feb 2009 11:24:40 -0600
Reply-To:     Mary <mlhoward@avalon.net>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mary <mlhoward@AVALON.NET>
Subject:      Re: A flaging question - very urgent
Comments: To: Tom Smith <need_sas_help@YAHOO.COM>
Content-Type: text/plain; charset="iso-8859-1"

Tom,

Form a character variable which has the flagged result:

data test; infile cards missover; input subject Units class; cards; 1001 23 30 1002 27 13 1007 29 25 1002 28 18 1007 56 09 ; run;

proc sql noprint; create table test2 as select subject, case when class > 20 then put(units,2.) || '*' else put(units,2.) end as units format $10., class from test; quit;

-Mary ----- Original Message ----- From: Tom Smith To: SAS-L@LISTSERV.UGA.EDU Sent: Thursday, February 19, 2009 11:03 AM Subject: A flaging question - very urgent

I have the following dataset with 3 variables (subject, Units,class):

subject Units class ------- ----- ----- 1001 23 30 1002 27 13 1007 29 25 1002 28 18 1007 56 09

I have to flag the variable Units if the value of the variable class is greater than 20:

so the final dataset (result dataset) should be as below:

subject Units class ------- ----- ----- 1001 23* 30 1002 27 13 1007 29* 25 1002 28 18 1007 56 09

Thanks you so much


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