GOLDMAN%FSU.MFENET@LLL-MFE.ARPA (12/03/86)
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)