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 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 17 Sep 2007 10:09:03 -0500
Reply-To:   Bruce J <chimanbj@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Bruce J <chimanbj@GMAIL.COM>
Subject:   Re: SAS Syntax "Case"?
Comments:   To: "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
In-Reply-To:   <2C6B65AAC3623140922DE580669C456A03B79F8B@LTA3VS001.ees.hhs.gov>
Content-Type:   text/plain; charset="us-ascii"

Since when did CYA = "Cover Your Assumptions"?

Someone put extra letters in there! LOL

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Fehd, Ronald J. (CDC/CCHIS/NCPHI) Sent: Monday, September 17, 2007 9:45 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: SAS Syntax "Case"?

> From: Lindberg, Andreas > I think I've seen something like "case of" in sas but now I > can't find it in the online help... What I want to do is: > If variablex is (case of) > '1' then dosomething; > '2' then dosomethingelse; > andanotherthing; > '3' then doyetanotherthing; > ... and so on > > surely sas has this... But what's it called

select(Var); when(Value1) ...; when(Value2) do; stmnt1; stmnt2; end; otherwise; end;

Values are in alignment with Var being character or numeric

'otherwise' is required; this reminds you to cya for 'everything else'

acronym: cya: 'Cover Your Assumptions'

Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov


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