Date: Thu, 5 Jun 2008 09:53:11 -0700
Reply-To: jfh@stanfordalumni.org
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject: Re: raise an error if libname fails?
In-Reply-To: <9b82375b-6048-48a4-b88c-db61131043e4@k13g2000hse.googlegroups.com>
Content-Type: text/plain; charset="ISO-8859-1"
In a macro, you can use %ABORT.
For some non-obvious reason, %ABORT works only within a macro.
On Thu, 5 Jun 2008 08:06:26 -0700, "Jеns Mаrtin
Schlаttеr" <KmoEfrUewEbx@SPAMMOTEL.COM> said:
> On 5 Jun., 14:07, sa...@DATASAVANTCONSULTING.COM (Gregg Snell) wrote:
> > Perhaps use the ABORT statement?http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a0002302100851856
>
> The abort statement is only valid in a data step.
> Of course I could construct a data step to use the abort stmt but this
> is not very elegant.
>
> I have found what I need:
> OPTIONS ERRORCHECK=STRICT
>
> places the SAS job into syntax-check mode when an error occurs in a
> LIBNAME or FILENAME statement, or in a LOCK statement in SAS/SHARE
> software. In addition, the job or session abends when a %INCLUDE
> statement fails due to a non-existent file.
--
Jack Hamilton
Sacramento, California
jfh@alumni.stanford.org <== Use this, not jfh@stanfordalumni.org
|