Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!LLL-MFE.ARPA!GOLDMAN%FSU.MFENET From: GOLDMAN%FSU.MFENET@LLL-MFE.ARPA Newsgroups: mod.computers.vax Subject: RECORDTYPE=SEGMENTED vs RECORDTYPE=VARIABLE Message-ID: <8612041215.AA18725@ucbvax.Berkeley.EDU> Date: Wed, 3-Dec-86 08:28:00 EST Article-I.D.: ucbvax.8612041215.AA18725 Posted: Wed Dec 3 08:28:00 1986 Date-Received: Thu, 4-Dec-86 20:03:01 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 20 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)