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 (August 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 22 Aug 2002 12:11:34 -0400
Reply-To:   Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject:   Re: macro code: How to check whether file is locked

One idea: you can refer to the physical file and try to FOPEN it with "O" (=Output)

filename a "c:\baba_arz.sas7bdat"; data test; x=fopen("a","O"); put x=; run;

if x=0 then the FOPEN was unsuccessful. Don't know if that works, but try it.

On Thu, 22 Aug 2002 17:34:52 +0200, Dietrich Alte <alte@UNI-GREIFSWALD.DE> wrote:

>Dear all, > >having tried with open and sysmsg - but not successful. > >How can I check before writing to a sas file (sas7bdat) in macro code, >whether this file is locked by some other user? > >TIA > >-- >----------------------------------------------------------------- > Dietrich Alte (Statistician, Dipl.-Stat.) > University of Greifswald - Medical Faculty > Institute of Epidemiology and Social Medicine > Walther-Rathenau-Str. 48, D-17487 Greifswald, Germany > Phone +49 (0) 3834 - 86 77 13, fax +49 (0) 3834 - 86 66 84 > Email alte@uni-greifswald.de > Institute http://www.medizin.uni-greifswald.de/epidem/ > Study http://www.medizin.uni-greifswald.de/epidem/ship.htm >-----------------------------------------------------------------


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