Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!dciem!nrcaer!cognos!jimp From: jimp@cognos.uucp (Jim Patterson) Newsgroups: comp.os.vms,comp.sys.dec,comp.org.decus Subject: Re: 2 questions: VAX-C RTL calls and VMS .DIR file entries Message-ID: <1000@aldebaran.UUCP> Date: Fri, 26-Jun-87 10:05:22 EDT Article-I.D.: aldebara.1000 Posted: Fri Jun 26 10:05:22 1987 Date-Received: Sat, 27-Jun-87 13:52:25 EDT References: <2405@usceast.UUCP> Reply-To: jimp@aldebaran.UUCP (Jim Patterson) Organization: Cognos Incorporated, Ottawa, Canada Lines: 36 Xref: dciem comp.os.vms:1052 comp.sys.dec:200 comp.org.decus:126 In article <2405@usceast.UUCP> still@usceast.UUCP (Bert Still) writes: > >Hi There, > The second question concerns VMS directories. I have perused the >"orange manuals" for the last two weeks looking for something that describes >the VMS directory files' organization. >(For the curious, I am trying to convert some systems programs that I have >from BSD UNIX to run under VMS, and I need the OPENDIR, READDIR, CLOSEDIR, and >IOCTL functions) Rather than trying to decode the VMS directory structures, you might be better off to use the RMS directory search primatives. You could set up the following equivalences: OPENDIR - establishes the directory name, and sets up SYS$SEARCH using the given directory name and a filename of *.*;* . (You may need to call SYS$PARSE at this point). READDIR - calls SYS$SEARCH to retrieve the next filename and store information about it into the FAB (File Access Block) and NAMe structures (plus any XABs you may need). You can then move whatever information is appropriate into the directory structure your program expects. CLOSEDIR - can just free up the various control structures. I don't know where IOCTL fits in. There are RTL routines that are similar (LIB$FIND_FILE, etc.). If all you need are names of files, these may be sufficient. -- Jim Patterson decvax!utzoo!dciem!nrcaer!cognos!jimp Cognos Incorporated