HELPLIB.HLB  —  FORTRAN  Statements  OPEN
existing file, the type that you specify must match the type of the existing file. If an output statement does not specify a full record for a file containing fixed-length records, the following occurs: o In formatted files, the record is filled with blanks o In unformatted files, the record is filled with zeros

30  –  SHARED

  SHARED

  Specifies that the file can be accessed by more than one user at
  the same time.

  For more information on file sharing, see the HP Fortran for
  OpenVMS User Manual.

31  –  STATUS

  Indicates the status of a file when it is opened.  It takes the
  following form:

  STATUS = sta

  sta  Is a character expression with one of the following
       values:

  'OLD'       Open an existing file.

  'NEW'       Create a new file; if the file already exists an
              error occurs.

  'SCRATCH'   Create a new file and delete it when the file is
              closed.

  'REPLACE'   Replace the file with another. If the file to be
              replaced exists, it is deleted and a new file is
              created with the same name.  If the file to be replaced
              does not exist, a new file is created and its status
              changes to 'OLD'.

  'UNKNOWN'   Open the file as OLD; if it does not exist, then
              open the file as NEW.

  The default is 'UNKNOWN'.  However, if you implicitly open a file
  using WRITE or you specify compiler option /NOF77 (or OPTIONS
  /NOF77), the default value is 'NEW'.  If you implicitly open a file
  using READ, the default is 'OLD'.

  Scratch files (STATUS='SCRATCH') are created on the user's default
  disk (SYS$DISK) and are not placed in a directory or given a name
  that is externally visible.  To indicate a different device, use
  the FILE specifier.

                                 NOTE

          The  STATUS  parameter  is  also  used   in   CLOSE
          statements  to  specify  the status of a file after
          the file is closed.  However, in  CLOSE  statements
          the  STATUS values are the same as those listed for
          the DISPOSE specifier (see OPEN DISPOSE).

32  –  TYPE

  TYPE is a nonstandard synonym for STATUS (see OPEN STATUS).

33  –  UNIT

  Indicates the logical unit to which a file is to be connected.  It
  takes the following form:

  [UNIT=] u

  u  Is a numeric expression

  The unit specification must appear in the parameter list, unless
  the unit specifier is the first element in the list.

  The logical unit may already be connected to a file when an OPEN
  statement is executed.  If this file is not the same as the one to
  be opened, the OPEN statement executes as if a CLOSE statement had
  executed just before it.

  If the file to be opened is already connected to the unit or if the
  file specifier (FILE keyword) is not included in the OPEN
  statement, only the blank specifier (BLANK keyword) can have a
  value different from the one currently in effect.  The position of
  the file is unaffected.

34  –  USEROPEN

  Indicates a user-written external function that controls the
  opening of the file.  It takes the following form:

  USEROPEN = func

  func  Is the symbolic name of the USEROPEN function.

  The function must be declared in a previous EXTERNAL statement; if
  it is typed, it must be INTEGER*4.
Close Help