Date: Thu, 5 Jun 2008 18:56:50 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: raise an error if libname fails?
Jack,
Not so non-obvious from the documentation:
%ABORT Statement
-------------
Stops the macro that is executing along with the current DATA step, SAS
job, or SAS session.
Of course, there is also ABORT (without the percent sign) statement.
Art
----------
On Thu, 5 Jun 2008 09:53:11 -0700, Jack Hamilton <jfh@STANFORDALUMNI.ORG>
wrote:
>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
|