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 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 15 Sep 2004 10:35:57 -0600
Reply-To:     Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:      Re: Turning off only specific errors
Comments: To: pchoate@DDS.CA.GOV
Content-Type: text/plain; charset=iso-8859-1

This sounds very similar to the IFN and IFC functions.

-- JackHamilton@FirstHealth.com Manager, Technical Development Metrics Department, First Health West Sacramento, California USA

>>> "Choate, Paul@DDS" <pchoate@DDS.CA.GOV> 09/15/2004 7:53 AM >>> IIF is an MDX function: http://support.sas.com/onlinedoc/912/getDoc/mdxag.hlp/a002607754.htm

"IIf returns one of two numeric or string values that are determined by a logical test.

IIf(<Logical Expression>,<String Expression1>,<String Expression2>) Note: If a numeric value is returned, then it is a numeric function, not a string function."

We always used IFF for the "strong if" in college.

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Droogendyk, Harry Sent: Wednesday, September 15, 2004 6:45 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Turning off only specific errors

Practice defensive programming!

Expected data conversion issues, i.e. via INPUT statement or function can be dealt with elegantly using the ? or ?? modifier.

e.g. numeric_fld = input(char_fld, ?? 12. );

As far as I know, there is no way to selectively turn off certain errors in SAS. The onus is on YOU to write robust code.

if blah then erb = gak / blah ; else erb = .;

I believe v9.1 has an implementation of "if and only if". See http://groups.google.ca/groups?hl=en&lr=&ie=UTF-8&threadm=7BB320A15C3A624384 97BE5D0A74846803795580%40m-phppo-1.phppo.cdc.gov&rnum=2&prev=/groups%3Fq%3Di if%26hl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.soft-sys.sas%26sa%3DG%26sco ring%3Dd for a clue.

-----Original Message----- From: jsl [mailto:nospam@NOSPAM.COM] Sent: Wednesday, September 15, 2004 9:22 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Turning off only specific errors

I have a couple programs that have tons of predictable errors, like reading in a number variable when the data value is missing or text (in which case, I want it to return a missing value) and things like that. I set "errors=1" so it won't repeat it forever, but given how many files I read, process, etc. my log file still gets bogged down with error messages so I have trouble finding the errors I really care about. Is there a way to tell says to not report any errors of a certain type (say, division by zero, missing substr() parameter, etc.). Thanks, Jim

____________________________________________________________This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.

Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.

============================================================


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