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 (June 2000, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 15 Jun 2000 10:20:47 -0400
Reply-To:     Mark.K.Moran@CCMAIL.CENSUS.GOV
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:     To: "Brucken, Nancy" <Nancy.Brucken@wl.com>
From:         Mark Moran <Mark.K.Moran@CCMAIL.CENSUS.GOV>
Subject:      Re: IF-THEN LOG ERROR
Comments: To: SAS-L@LISTSERV.VT.EDU
Content-type: text/plain; charset=us-ascii

... And I should have mentiond thank you to Nancy as well!

Mark

"Brucken, Nancy" <Nancy.Brucken@wl.com> on 06/15/2000 09:11:11 AM

To: Mark K Moran/CSD/HQ/BOC@BOC

cc:

Subject: RE: IF-THEN LOG ERROR

Hi Mark, Not sure if this is a result of your cutting, pasting and rearranging, but you've got a stray '.' in your IN list:

if ((bk IN ('20210','20220','20310','20320'.'20910','20920')) ^

Try changing that to a comma, and see if that fixes your problem. You also need another left paren at the beginning of your ELSE clause:

ELSE IF ((bk IN ('20210','20220','20310','20320','20910','20920')) ^

Hope this helps, Nancy

Nancy Brucken Parke-Davis, Clinical Informatics (734) 622-5767 E-mail address: Nancy.Brucken@wl.com

-----Original Message----- From: Mark Moran [mailto:Mark.K.Moran@CCMAIL.CENSUS.GOV] Sent: Thursday, June 15, 2000 8:51 AM To: SAS-L@LISTSERV.UGA.EDU Subject: IF-THEN LOG ERROR

The following SAS 6.12 log shows the first error in a much longer program. I suspect the problem with the IF-THEN has to do with parentheses. The line overtop the 200 occurs directly lined up under the word "and" in line 288 (it got shifted when I cut and pasted into this email, but I hopefully have moved it back to the correct spot). I am wondering what the problem is. Maybe it would help if I woke up! :) Mark >>>>>>>>>>>>>>>> cpu time 0.89 seconds

283 284 Data WORK.WHIST(keep=id by1 by2 by3 weight bynum type1 type2 type3 item nvalue); 285 length BY2 $2; 286 set WORK.GIST; 287 Indicate = empt; 288 if ((bk IN ('20210','20220','20310','20320'.'20910','20920')) and (empt=2)) - 200 289 THEN by1='20A'; 290 /* IF (bk IN ('20210','20220','20310','20320','20910','20920')) */ 291 /* THEN by1=bk; */ 292 ELSE IF (bk IN ('20210','20220','20310','20320','20910','20920')) and (empt=1)) - 22

200 293 THEN by1='20B'; ---- 202 294 ELSE by1=substr(bk,1,3); ERROR: No matching IF-THEN clause. 295 by2=Indicate; 296 by3=other;


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