Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!ucbvax!QUCDNEE1.BITNET!PENSTONE From: PENSTONE@QUCDNEE1.BITNET.UUCP Newsgroups: mod.computers.vax Subject: Getting file attributes Message-ID: <8701140406.AA19804@ucbvax.Berkeley.EDU> Date: Mon, 12-Jan-87 16:03:00 EST Article-I.D.: ucbvax.8701140406.AA19804 Posted: Mon Jan 12 16:03:00 1987 Date-Received: Wed, 14-Jan-87 19:21:45 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 19 Approved: info-vax@sri-kl.arpa < How does one determine from inside a program whether an existing disk file < (FORM="UNFORMATTED") is RECORDTYPE="VARIABLE" ..... There is a C function stat() that returns some information about a file. It puts it into a structure which is described in stat.h of the C library. The values to look for in the "record format" and "record attributes" values are described in fab.h. You can identify the values FAB$C_FIX or FAB$C_VAR in the st_fab_rfm field of the structure filled by the stat() call, and the record attributes in the st_fab_rat field. If that doesn't work, then you will have to use the dreaded FAB and RAB calls provided in RMS ! (Not really as terrifying as they look; an afternoon's reading of the RMS manuals will usually suffice...they work well from C, but are a bit more of a pain in FORTRAN because of the difficulty of creating structures.) Sid Penstone Dept. Of Electrical Engineering, Queen's University, Kingston, Ontario, Canada PENSTONE@QUCDNEE1.BITNET