C$Procedure OPSFOR C SUBROUTINE OPSFOR ( UNIT , FILE , ERROR ) C C C******************************************************************************* C C Copyright (C) 1993, California Institute of Technology. U.S. C Government Sponsorhip under NASA Contract NAS7-918 is C acknowledged. C C******************************************************************************* C C$ Purpose C C OPSFOR opens a sequential, formatted, old, readonly file. C C For example, when opening a file to read one or more namelist. C C$ Log C C 22-Apr-1988 C Eric Cannell - birth C C$ Input_Arguments C C UNIT - FORTRAN unit number C FILE - file name C C$ Output_Arguments C C ERROR - set .FALSE. if file was opened successfully. Otherwise, C .TRUE. C C$ Files C C FILE - UNIT - sequential, formatted, old, readonly file C C$ Declarations_of_Input_and_Output_Arguments C LOGICAL ERROR CHARACTER*(*) FILE INTEGER UNIT C C$ Method C-& C1 Set error flag to false. ERROR = .FALSE. C1 Attempt to open file. OPEN ( & UNIT = UNIT, & FILE = FILE, & ACCESS = 'SEQUENTIAL', & FORM = 'FORMATTED', & STATUS = 'OLD', & READONLY, & ERR = 998 & ) GOTO 999 C1 Set error flag to true if there was a problem. 998 CONTINUE ERROR = .TRUE. C1 Return status. 999 CONTINUE RETURN END