SUBROUTINE CHKMOU ( luntst, dev, idev, status ) C CHARACTER*80 dev CHARACTER*80 file CHARACTER*15 def C LOGICAL contin, + count, + typ, + log INTEGER*2 idev, status INTEGER*2 luntst INTEGER*2 lendef INTEGER*2 errnum, maxnum C DATA def/'[0,0]000000.DIR'/ DATA maxnum/15/ DATA errnum/43/ ! Error number to ignore. DATA lendef/15/ DATA contin/.TRUE./, + count/.FALSE./, + typ/.TRUE./, + log/.FALSE./ C C Executable begins here. C CALL ERRSET ( 43, , , , log ) ! Skip error 43; this error is ! associated with FCS error ! -16, privilege violation. file(1:idev) = dev(1:idev) ! Put in device name. IF ( lendef + idev .GT. 80 ) THEN ! Check length. status = -1 ! Device name too long. ELSE ! Legal length. file(idev+1:lendef+idev) = ! Load default file. + def(1:lendef) ! OPEN ( UNIT = luntst, ! Logical unit. + FILE = file(1:lendef+idev), ! Master file directory name. + STATUS = 'old', ! Must already exist. + FORM = 'unformatted', ! Unformatted. + RECL = 4, ! 16 bytes long. + RECORDTYPE = 'fixed', ! Fixed length records. + READONLY, SHARED, ! Only read and share it. + ERR = 9900 ) ! Error jump. status = 1 ! Success. END IF ! End illegal length test. 9000 CONTINUE ! Jump to here after error. CLOSE ( UNIT = luntst ) ! Close file regardless. RETURN ! Common return point. C 9900 CONTINUE status = -2 ! Could not open. GO TO 9000 ! Jump to return. END