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 2012, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 27 Feb 2012 18:46:04 -0500
Reply-To:     "Kirby, Ted" <ted.kirby@LEWIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Kirby, Ted" <ted.kirby@LEWIN.COM>
Subject:      Re: IF THEN clause
In-Reply-To:  A<201202231306.q1N5aSd8025343@waikiki.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

You cannot join "THEN" instructions in that way. You need to use a DO/END statement in conjunction with the IF/THEN statement as in:

if code=11 then do; country_code=1; country_name="UK"; end;

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of HanLes Sent: Thursday, February 23, 2012 8:07 AM To: SAS-L@LISTSERV.UGA.EDU Subject: IF THEN clause

Hello...can someone tell a newbie, is it possible to make many THEN within one IF sentence e.g.

if code=11 then country_code=1 and country_name="UK";

Can't get it working in this way, any suggestions? Thanks in advance! ************* IMPORTANT - PLEASE READ ********************

This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.


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