Emoslib is now deprecated

A subroutine which can be called from FORTRAN to open an unblocked binary file and return a suitable file pointer for use in calls to the other PB subroutines. The return status code must be checked after calling the subroutine.

The format and arguments for the subroutine are:

      SUBROUTINE PBOPEN(KUNIT, FILENAME, MODE, KRET)

Input arguments are CHARACTERs.

 

PBOPEN input arguments
FILENAMECharacter string giving a Unix filename
MODE
Character describing the mode of access to the file:
 `r' for read,
 `r+' for read and write,
 `w' for write,
 `a' for append

 

Output arguments are INTEGERs.

 

PBOPEN output arguments
KUNIT
Index in an internal array of a C file pointer for the file.
Note that this is not the same as, or compatible with, a Fortran unit number
as used in Fortran file-handling statements such as OPEN, READ, ....
KRET
Status return code:
  0, successful
 -1, could not open the file, eg it does not exist, or does not have suitable
     permission for the requested access
 -2, invalid filename
 -3, invalid open mode specified