October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

What Is a Fixed-Length Record? Definition and Examples

A fixed-length record always contains the same number of bytes as other records in its file. See how that differs from variable-length records and how IBM COBOL and z/OS describe it.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A fixed-length record is a logical record in a file that always contains the same number of bytes as every other record in that file. Its length stays constant; the record layout—not the fixed length itself—defines what the bytes and fields mean.

What does “fixed-length record” mean?

IBM defines a fixed-length record as a record associated with a file whose description requires all records to contain the same number of bytes. In practical terms, each record occupies a predictable amount of space, so the next record begins at a predictable position when records are stored consecutively.

As an Amazon Associate I earn from qualifying purchases.

Fixed length applies to records within the relevant file format. It does not mean that different files must use the same record length.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does fixed length tell you—and what does it not?

It tells you the size of each record, not how to interpret its contents. A separate record layout or schema defines the fields, their types, and their positions. For example, a 25-byte record might have fields assigned to particular byte ranges, but the length alone does not reveal what those fields represent.

With a consistent layout, software can look for a field at the same offset in every record. The format therefore offers predictable boundaries, while the schema supplies meaning.

Fixed-length and variable-length records compared

Characteristic Fixed-length record Variable-length record
Record size The same number of bytes for every record in the file. May differ from record to record within a specified range.
Field positions Can be read at consistent offsets when records share the same layout. Positions may depend on the record’s contents or length and the layout rules.
Length description A single fixed record length. A minimum and maximum length can be declared; IBM COBOL uses a varying-record clause for this case.

Variable length does not mean that record boundaries are unknowable: the file format must provide a way to determine each record’s actual length. The exact representation depends on the format.

How IBM z/OS identifies fixed records

In IBM z/OS data set terminology, RECFM identifies the record format and LRECL gives the logical record length. IBM’s DFSORT documentation uses RECFM=FB and LRECL=25 as an example: each logical record is 25 bytes, and B indicates that the records are blocked. Blocking concerns how logical records are grouped in a physical block; it does not change the meaning of a record’s logical length.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

IBM’s programming guide describes format-F logical records as fixed length and notes that a block can contain multiple logical records. A block’s size and a record’s size are therefore related storage concepts, but they are not interchangeable.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How fixed record length is declared in COBOL

In IBM Enterprise COBOL, a program can specify a fixed record size with a RECORD CONTAINS integer clause. Alternatively, the clause may be omitted when all level-01 record descriptions for the file have the same fixed size. IBM says the stated record size should match the data set’s length attribute.

For records whose sizes can vary, IBM COBOL documents a RECORD IS VARYING FROM ... TO ... clause to declare the permitted minimum and maximum lengths. That is a different arrangement from a fixed-length file, where every record has one shared byte count.

Sources

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.