      SUBROUTINE RBOPEN (INFILE)
      IMPLICIT NONE
      CHARACTER*(*) INFILE
*
* RBOPEN - Open a readable link to the input binary file
*
* This routine contains code for various types of machines
* (ie. VMS and non-VMS, DEC and non-DEC) which need to be selectively
* commented out to match your particular environment. We have not
* tested this on many different platforms, so you may need to make
* your own changes anyway!
*
* Local variables...
*    WORDSZ - Word size for I/O records
*
      INCLUDE 'misc.inc'
      INCLUDE 'labl.inc'

      INTEGER WORDSZ

****************************************************************************
* Version of word size for DEC machines (VAX/VMS, Alpha/VMS and OSF/1)...
*
***   WORDSZ = 4
****************************************************************************
* Version of word size for non-DEC machines...
*
      WORDSZ = 1
****************************************************************************
* Version of OPEN statement for VMS (both VAX/VMS and Alpha/VMS) machines...
*
***   OPEN (UNIT=BINLUN,FILE=INFILE,STATUS='OLD',
***  +      READONLY,ACCESS='SEQUENTIAL',FORM='FORMATTED',
***  +      ERR=900)
***   INQUIRE (UNIT=BINLUN,RECL=BINLEN)
****************************************************************************
* Version of OPEN statement for UNIX type machines. This assumes that the
* Binary file was rebuilt on your local machine (with BIN2ASC) using a
* fixed record length of 372. This corresponds to the longest possible
* width of ISAMS level 3A files.
*
      BINLEN = 372
      OPEN (UNIT=BINLUN,FILE=INFILE,STATUS='OLD',
     +      ACCESS='DIRECT',RECL=BINLEN/WORDSZ,FORM='UNFORMATTED',
     +      ERR=900)
      IREC = 0
****************************************************************************

      RETURN
*
* Errors...
*
  900 CONTINUE
      PRINT *,'Cannot open Binary file!'
      STOP

      END
