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 (November 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 6 Nov 2008 08:41:57 -0500
Reply-To:   Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject:   Re: If then : evidence !
Content-Type:   text/plain; charset=ISO-8859-1

...what did the user expect to get? (a very strange method to assign 0...) Another idea, to assign 10:

data cl; set sashelp.class; if sex="M" then age=(10 or sex="2")*10; /*else...;...; */ run;

or also interesting, to avoid changing anything:

data cl; set sashelp.class; if sex="M" then age=(10 or sex="2")*age; /*else...;...; */ run;

in germany we say (don't know if that is a good translation): to shake the haunters off...

Gerhard

On Thu, 6 Nov 2008 12:09:38 +0100, Andre Wielki <wielki@INED.FR> wrote:

>A user here was writing Sas code analogous to this one >data cl; >set sashelp.class; >if sex="M" then age=10 and sex="2"; /*else...;...; */ >run; > >As the log was > >203 data cl; >204 set sashelp.class; >205 if sex="M" then age=10 and sex="2"; >206 run; > >NOTE: There were 19 observations read from the data set SASHELP.CLASS. >NOTE: The data set WORK.CL has 19 observations and 5 variables. >NOTE: DATA statement used (Total process time): > real time 0.00 seconds > cpu time 0.00 seconds > > >He was going further!!!!!!!!!! > >I hope everybody reading this is aware of the results! >If not submit, quick look at the results. > > > >Andre > >-- > Andr� WIELKI > INED (Institut National d'Etudes D�mographiques) > Service Informatique > 133 Boulevard Davout 75980 Paris Cedex 20 > m�l : wielki@ined.fr t�l : 33 (0) 1 56 06 21 54


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