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 (May 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 12 May 2010 18:13:50 -0400
Reply-To:     Chang Chung <chang_y_chung@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Chang Chung <chang_y_chung@HOTMAIL.COM>
Subject:      Re: Alternative for "goto" in do loop
Comments: To: Joe Matise <snoopy369@GMAIL.COM>

On Wed, 12 May 2010 16:56:26 -0500, Joe Matise <snoopy369@GMAIL.COM> wrote:

>Can't you use the ERROR statement and associated commands/auto variables to >handle this rather than jumping about? > >-Joe Hi, Joe, Nope, you can't. We still need jumping. Below data step gets you 19 obs instead of 2. Cheers, Chang

data three; set sashelp.class; if age < 14 then error "age error"; if height < 63 then error "height error"; if sex ^= "F" then error "sex error"; if not ("A"<=substr(name,1,1)<="S") then error "last name error"; put name=; run;


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