|Date: ||Fri, 13 Jun 2008 16:09:47 -0400|
|Reply-To: ||Talbot Michael Katz <topkatz@MSN.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Talbot Michael Katz <topkatz@MSN.COM>|
|Subject: ||Trapping errors|
I have a process with several data and proc steps, all bound and up and
tethered in a macro. Every now and then, one of the steps may fail,
leading to a bunch of error messages from subsequent steps that depended
on the errant output of the step that first failed. I'd like to be able
to control the execution of subsequent steps based upon the success or
failure of previous steps. But SAS doesn't seem to have a uniform way of
doing this. I know some of the codes I can check:
For libname statements, check &syslibrc.
For data step errors, check &syserr. &syserr also appears to work for at
least some PROC SQL errors.
The documentation mentions &syslckrc for lock statements.
There's also &sysrc, but I don't know whether that gives any error
Right now I'm particularly interested in trapping errors from:
so if anyone can tell me how to trap errors from these procedures I'd
certainly appreciate it (especially if they're not fully covered by syserr
and syslibrc). Also, this list is sure to expand. Is there a document
that collects all or most of the information on how to trap errors from
various SAS procedures?
-- TMK --
"The Macro Klutz"