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 (October 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 13 Oct 2005 11:45:30 -0700
Reply-To:   David L Cassell <davidlcassell@MSN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   David L Cassell <davidlcassell@MSN.COM>
Subject:   Re: Logging errors
In-Reply-To:   <200510130930.j9D6uObb003234@malibu.cc.uga.edu>
Content-Type:   text/plain; format=flowed

tom.hide@DEHIWORLD.COM wrote: >I am carrying out some validation within my program and want to force an >error message in the log. > >The error is recoverable, so I want to continue processing the following >steps, but still want to show an error, in red, in the log. > >e.g. > >data t2; >i=3; >if i=3 then abort return 3; >run; > >data yy; >a=2; >run; > >I get the error message OK, which shows in red, but I want to continue >processing the following steps. > >ERROR: Execution terminated by an ABORT statement at line 10 column 13, it >specified the RETURN option. >i=3 _ERROR_=1 _N_=1 > >I can easy show a warning message, but it's always difficult to force users >to read the log.

[1] If you can't get the users to read the log, what good will the error message in the log do? Or would you prefer some sort of log parser which flags messages like these?

[2] Since you want the program to keep going, you migh opt for something else, like:

data t2; set t1; if i=3 then putlog 'ERROR: I is 3 and I can't take it any more!'; run;

PUTLOG is a SAS 9 statement. I like it.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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