|
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.
============================================================
|