10.6.18 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). 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:

You must specify RECL when you open files with fixed-length records.

The maximum length for rl depends on the record type and the setting of the CARRIAGECONTROL keyword, as shown in Table 10-2.

Table 10-2 Record Size (RECL) Limits on Tru64 UNIX Systems

Record Type  CARRIAGECONTROL  Formatted (bytes) 
FIXED  NONE  2147483647 (2**31-1)[1] 
VARIABLE  NONE  2147483640 (2**31-8) 
SEGMENTED  NONE  32764 (2**15-4) 
STREAM  NONE  2147483647 (2**31-1) 
STREAM_CR  LIST  2147483647 (2**31-1) 
  FORTRAN  2147483647 (2**31-2) 
STREAM_LF  LIST  2147483647 (2**31-1)[2] 
  FORTRAN  2147483646 (2**31-2) 

[1] Subtract 1 if compiler option VMS is used.
[2] U*X only

The default value depends on the setting of the RECORDTYPE keyword, as shown in Table 10-3.

Table 10-3 Record Size (RECL) Default Values on Tru64 UNIX Systems

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


Previous Page Next Page Table of Contents