9.6.22 RECL Keyword

The RECL keyword specifies the logical length of records in a file. It takes the following form:

RECL = rl
rl
Is a numeric expression indicating the length of logical records in the file.

The value of rl 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 specification is for record data only.

The value of rl 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 interpretation and effect of the logical record length varies as follows:

Table 9-2 lists the maximum values that can be specified for rl for disk files that use the fixed- length record format:

Table 9-2 Record Size (RECL) Limits on OpenVMS Systems

  Record I/O Statement Format 
File Organization   Formatted (bytes)   Unformatted (longwords) 
Sequential  32767  8191 
Relative  32255  8063 
Indexed  32224  8056 

For other record formats and device types, the record size limit may 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:

Default values depend on the value of the RECORDTYPE keyword, as shown in Table 9-3,

Table 9-3 Record Size (RECL) Default Values on OpenVMS Systems

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


Previous Page Next Page Table of Contents