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 (June 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 5 Jun 2008 07:07:21 -0500
Reply-To:   Gregg Snell <sas-l@DATASAVANTCONSULTING.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Gregg Snell <sas-l@DATASAVANTCONSULTING.COM>
Subject:   Re: raise an error if libname fails?
In-Reply-To:   <>
Content-type:   text/plain; charset=KOI8-R

Perhaps use the ABORT statement? 0851856

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Paige Miller Sent: Thursday, June 05, 2008 6:58 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: raise an error if libname fails?

On Jun 5, 5:02 am, JĊns MÁrtin SchlÁttĊr <> wrote: > I have a batch job which needs a lot of libnames. > Before processing begins, I want to test if the libname (data set) is > available (on the mainframe). > > Therefore, I'd like to have a macro like this: > > %macro test_alloc(dsname); > libname pd &dsname disp=shr; > %if &syslibrc ne 0 %then ???; > libname pd clear; > %mend; > > But which action should I do in the %then statement to prevent further > processing AND signaling an error? Of course "endsas" is not adequate. > > JMS

%if &syslibrc ne 0 %then %do; /* Signal the error code here */ %end; %else %do; libname pd clear; %end;

-- Paige Miller paige\dot\miller \at\ kodak\dot\com

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