      SUBROUTINE RBREAD (BINREC)
      IMPLICIT NONE
      CHARACTER*(*) BINREC
*
* RBREAD - Read Binary record from the input file
*
* Passed Variables...
*    BINREC - String containing binary record being read in
*
* Local Variables...
*    IOS    - Input/Ouput status value, in case of error
*
      INCLUDE 'misc.inc'
      INCLUDE 'labl.inc'
      INTEGER IOS

****************************************************************************
* Version of READ for VMS (both VAX/VMS and Alpha/VMS) machines...
*
***   READ (UNIT=BINLUN,FMT='(A)',
***  +      END=900,ERR=910,IOSTAT=IOS) BINREC(:BINLEN)
****************************************************************************
* Version of READ for UNIX type machines...
*
      IREC = IREC + 1
      READ (UNIT=BINLUN,REC=IREC,IOSTAT=IOS) BINREC(:BINLEN)
      IF (IOS .NE. 0) GOTO 910
****************************************************************************

      RETURN
*
* Errors...
*
  900 CONTINUE
      PRINT *,'* RBREAD: Unexpected end of input binary file!'
      PRINT *,'          IOSTAT = ',IOS
      STOP

  910 CONTINUE
      PRINT *,'* RBREAD: Error reading input binary file!'
      PRINT *,'          IOSTAT = ',IOS
      STOP

      END
