Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!mordor!styx!ames!ucbcad!ucbvax!NMFECC.ARPA!GOLDMAN%FSU.MFENET From: GOLDMAN%FSU.MFENET@NMFECC.ARPA Newsgroups: mod.computers.vax Subject: (none) Message-ID: <870109132114.03q@nmfecc.arpa> Date: Fri, 9-Jan-87 16:21:14 EST Article-I.D.: nmfecc.870109132114.03q Posted: Fri Jan 9 16:21:14 1987 Date-Received: Sat, 10-Jan-87 04:00:19 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" or RECORDTYPE="SEGMENTED" (say from within a FORTRAN program). I have had many suggestions to use the INQUIRE statement, so perhaps I should have mentioned that for un'OPEN'ed files the INQUIRE statement returns RECORDTYPE=VARIABLE whenever the file is either VARIABLE or SEGMENTED. My primitive solution to the problem has been to OPEN the file with RECORDTYPE=SEGMENTED and then do a test read with IOSTAT=IOS. If IOS=35 (segmented record format error) I CLOSE the file and re'OPEN it, this time with RECORDTYPE=VARIABLE. Otherwise I just REWIND the file and go on about my business. Thanks Harvey Goldman Physics Department Florida State Univ. Tallahassee, Florida 32301 (904-644-1492)