Skip to content
Datasets & storage

Logical record length

How long each record in a dataset is, in characters, written as LRECL.

Also written LRECL, record length

Logical record length, always written LRECL, is the size of a single record in a dataset. For a fixed-format dataset it is the exact length of every record; for a variable-format one it is the maximum a record may reach.

The number 80 appears everywhere. JCL libraries, COBOL source libraries, REXX libraries and copybooks are conventionally 80 characters per record, because that is how many columns a punched card had. That heritage still shapes the tools: JCL statements have meaningful column positions, and COBOL traditionally reserves particular columns for sequence numbers and continuation marks.

Report and print datasets are usually wider, commonly 121 or 133 characters, the extra one being a carriage control character.

LRECL is set when a dataset is created and must match what programs expect. If a program writes 100-character records to a dataset defined for 80, it fails. When you copy data between datasets, matching the record length and format is the thing to check first.

Browse all 115 terms

Learn this properly.

Use Logical record length for real in Mainframe101, in your browser, with Zed beside you. Join the waitlist.

Early access and updates. No spam, unsubscribe any time.