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 (March 2002, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 29 Mar 2002 04:20:59 -0800
Reply-To:     Stephan <petzchen@GMX.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Stephan <petzchen@GMX.DE>
Organization: http://groups.google.com/
Subject:      Problems with %sysfunc(exist(DataSet,'ACCESS'));  Please,
              heeeelp!!!
Content-Type: text/plain; charset=ISO-8859-1

Hello,

I want to check with a macro whether or not an Access descriptor file exists. My file:bcgtmsf3.sas7bacs

With the open code routine it returns the right result (1, because it already exitsts):

Open Code: Libname CBADLIB "E:\Projekte\Aktuell\SAS\Test\Codebooks\tmp\ADLib";

data _NULL_;

if (exist("CBADLIB.BCGTMSF3","ACCESS")) then put fname 'exists'; else put fname 'does not exist'; run;

But within a macro I got always 0 as the return value.

Macro: %if (%sysfunc(exist("CBADLIB.BCGTMSF3","ACCESS"))) %then %put CBADLIB.BCGTMSF3 'exists'; %else %put CBADLIB.BCGTMSF3 'does not exist';

Does somebody know why it doesn't work with this macro?

Thans in advance, Stephan


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