HELPLIB.HLB  —  FORTRAN  Statements  OPEN  RECL
  Indicates the length of logical records in a file connected for
  direct or keyed access, or the maximum length of a record in a file
  connected for sequential access.  It takes the following form:

  RECL = rl

  rl  Is an numeric expression.  If necessary, the value is
      converted to integer data type before use.

  If the file is connected for formatted data transfer, the value
  must be expressed in bytes (characters).  Otherwise, the value is
  expressed in 4-byte units (longwords).  If the file is connected
  for unformatted data transfer, the value can be expressed in bytes
  if compiler option /ASSUME=BYTERECL is specified.

  The "rl" value is the length for record data only.  It does not
  include space for control information, such as two segment control
  bytes (if present) or the bytes that RMS requires for maintaining
  record length and deleted record control information.

  The length specified is interpreted depending on the type of
  records in the connected file, as follows:

   o  For segmented records, RECL indicates the maximum length for
      any segment (not including the two segment control bytes).

   o  For fixed-length records, RECL indicates the size of each
      record.

   o  For variable-length or stream records, RECL specifies the size
      of the buffer that will be allocated to hold records read or
      written.  Specifying RECL for stream records (STREAM, STREAMCR
      or STREAMLF) is required if the longest record length in the
      file exceeds the default RECL value.

  Errors occur under the following conditions:

   o  If your program attempts to write to an existing file a record
      that is longer than the logical record length

   o  If you are opening an existing file that contains fixed-length
      records or has relative organization and you specify a value
      for RECL that is different from the actual length of the
      records in the file

  The following table lists the maximum values that can be specified
  for "rl" for disk files that use the fixed-length record format:

    Sequential formatted               32767 bytes
    Sequential unformatted              8191 longwords
    Relative formatted                 32255 bytes
    Relative unformatted                8063 longwords
    Indexed formatted                  32224 bytes
    Indexed unformatted                 8056 longwords
    Tape formatted                      9999 bytes
    Tape unformatted                    2499 longwords

  For other record formats and device types, the record size limit
  may be less, as described in the OpenVMS Record Management
  Services Reference Manual.

  You must specify RECL when opening new files (STATUS='NEW',
  'UNKNOWN, or 'SCRATCH') and when one or more of the following
  conditions exists:

   o  The file is opened for direct access (ACCESS='DIRECT').

   o  The record format is fixed length (RECORDTYPE='FIXED').

   o  The file organization is relative or indexed
      (ORGANIZATION='RELATIVE' or 'INDEXED').

  The default value depends on the setting of the RECORDTYPE
  specifier, as follows:

  RECORDTYPE value    RECL value
  ----------------    -----------------------------------------

  'FIXED'             None; value must be explicitly specified.
  All other types     133 bytes (for formatted records)
                      511 longwords (for unformatted records)
Close Help