LRECL= System Option

Specifies the default logical record length to use for reading and writing external files.
Valid in: Configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: Files: External files
Note: This option can be restricted by a site administrator. For more information, see Restricted Options.


LRECL=n | nK | hexX | MIN | MAX

Syntax Description

specifies the logical record length in multiples of 1 (bytes) or 1,024 (kilobytes) . For example, a value of 32 specifies 32 bytes, and a value of 32k specifies 32,767 bytes.
specifies the logical record length as a hexadecimal value. You must specify the value beginning with a number (0–9), followed by an X. For example, the value 2dx sets the logical record length to 45 characters.
specifies a logical record length of 1.
specifies a logical record length of 32,767.


The logical record length for reading or writing external files is first determined by the LRECL= option in the access method statement, function, or command that is used to read or write an individual file, or the DDName value in the z/OS operating environment. If the logical record length is not specified by any of these means, SAS uses the value that is specified by the LRECL= system option.
Use a value for the LRECL= system option that is not an arbitrary large value. Large values for this option can result in excessive use of memory, which can degrade performance.
z/OS Specifics: Under z/OS, the LRECL= system option is recognized only for reading and writing HFS files.