Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!mit-eddie!husc6!seismo!esosun!net1!sdcsvax!ucbvax!CITHEX.CALTECH.EDU!carl From: carl@CITHEX.CALTECH.EDU (Carl J Lydick) Newsgroups: mod.computers.vax Subject: Re: LIB$FIND_FILE problem. Message-ID: <861113121634.064@CitHex.Caltech.Edu> Date: Thu, 13-Nov-86 16:55:06 EST Article-I.D.: CitHex.861113121634.064 Posted: Thu Nov 13 16:55:06 1986 Date-Received: Sat, 15-Nov-86 02:54:13 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 26 Approved: info-vax@sri-kl.arpa > I have a problem with LIB$FIND_FILE. I use this routine to set the default > one level higher, but when I call it repeatedly I get back the same > default after one time. It probably has something to do with a context > block that is not deallocated, though I use LIB$FIND_FILE_END after each > call to LIB$FIND_FILE. I use them the following way, both routines > correctly declared: > > Context := 0; > LIB$FIND_FILE('[-]', Default, Context, Default); > LIB$FIND_FILE_END(Context); > > Has someone an idea what might be the problem? Since you've explicitly specified a directory in the file-spec you gave to LIB$FILE_SCAN(), the directory part of default-spec is ignored. If you want to set your default one level higher, use SYS$SETDDIR() to do so; if you just want to scan for files, do something along the lines of: DEFDIR = ']' ... ... ICTX = 0 LIB$FIND_FILE('['//DEFDIR, FILE, ICTX, wild-spec) ... DEFDIR = '-'//DEFDIR ... END