VMS Help FORTRAN, Statements, OPEN, RECL *Conan The Librarian (sorry for the slow response - running on an old VAX) |
RECL = rl rl Is an numeric expression whose value indicates the length of logical records in a file. The value of "rl" does not include space for control information, such as for two segment control bytes (if present) or the bytes that RMS requires for maintaining record length and deleted record control information. The specification is for record data only. The value of "r1" is expressed in units of bytes or longwords, depending on the record's format. Formatted records use byte units and unformatted records use longword units (which are equal to 4 bytes). The following are the maximum values that can be specified for "r1" 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 can be less, as described in the "OpenVMS Record Management Services Reference Manual". RECL is mandatory when opening new files (STATUS='NEW', 'UNKNOWN, or 'SCRATCH') and when one or more of the following conditions exists: o The record format is fixed length (RECORDTYPE='FIXED'). o The file organization is relative or indexed (ORGANIZATION='RELATIVE' or 'INDEXED'). o The file is opened for direct access (ACCESS='DIRECT'). RECL is optional in all other cases. Default values for optional cases depend on the value of the RECORDTYPE parameter. The following are the RECL default values: RECORDTYPE value RECL value ---------------- ----------------------------------------- 'FIXED' None; value must be explicitly specified. All other types 133 bytes (for formatted records) 511 longwords (for unformatted records) The interpretation and effect of the logical record length varies as follows: o If the file contains segmented records, RECL specifies the maximum length for any segment (including the two segment-control bytes). o If the file contains fixed-length records, RECL specifies the size of each record. o If the file contains variable-length records, RECL specifies the maximum length for any record. o If your program attempts to write to an existing file a record that is longer than the logical record length, an error occurs. 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, an error occurs.
|