A variable-length record is a record whose size can differ from other records in the same file or format. Because its end is not at one predictable position, the format must provide a way to identify where the record ends—such as a stored length or other framing information. The precise method and maximum size depend on the format.
What is a variable-length record?
ECMA International defines it as “a record contained in a file that is assigned to contain records that may have different lengths” in ECMA-119, §6.10.4. The term describes how record sizes may differ; it does not prescribe one universal byte layout.
As an Amazon Associate I earn from qualifying purchases.
A fixed-length record, by comparison, has the same length as other records of its kind in that file. With fixed-length records, a reader can often locate the next record using the shared size. With variable-length records, it needs some way to determine each record’s boundary.
How does a format mark the record’s end?
Formats use different framing conventions. Some store a length value; others may use delimiters, block structure, or system-managed metadata. The reader must follow the convention defined for that particular format rather than assume a universal encoding.
#1 Best Overall
| Format or system | Boundary information | Size or traversal detail |
|---|---|---|
| ECMA-119 | A Record Control Word (RCW) immediately precedes the record in its media data unit. | The RCW specifies length as a 16-bit number. The standard assigns a maximum record length for a file from 1 to 32,767; this is an ECMA-119 rule, not a general limit. [ECMA-119] |
| Intel Fortran sequential unformatted files | Four bytes of control information precede and follow the data, containing length fields. | The trailing length supports backward positioning. Intel also documents splitting very large records into subrecords. These details apply to the documented compiler/file convention. [Intel Fortran documentation] |
| LAS point-cloud files | Each Variable Length Record (VLR) carries its size in its header. | VLR payloads are limited to 65,535 bytes; Extended Variable Length Records (EVLRs) support larger payloads. [LAS specification] |
In ECMA-119, the RCW is followed by the record, with a zero byte after it if needed to make the media data unit even in length. The standard permits a zero minimum record length. Those are details of that standard’s layout, not properties shared by every variable-length record.
Why do databases use variable-length records?
Database records may vary because they contain strings of different lengths, optional or differing fields, or repeating groups. A teaching example in Database System Concepts course slides places offsets and lengths in a fixed-size portion, then stores variable data after fixed-size attributes. A database can use this metadata to locate a field instead of assuming it begins at the same byte offset in every record.
Rank #2
This is one representative design. Database systems can organize records differently, so the term alone does not tell you where variable data resides or how a system locates it.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →What happens when a record does not fit in one storage unit?
Overflow behavior depends on the system. CA IDMS documentation describes a variable-length indicator and a root portion stored on a home page; if the record does not fit, the remaining data may be kept in fragments on subsequent pages. That is a CA IDMS storage mechanism, not a universal requirement for variable-length records. [CA IDMS documentation]
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Example: variable-length records in LAS files
LAS point-cloud files can contain a public header, optional VLRs, point records, and optional EVLRs. VLRs carry auxiliary information such as projection information, metadata, waveform packet information, or application data. Their headers are 54 bytes, and their payload length is limited to 65,535 bytes. EVLRs provide room for larger payloads and can be appended at the end of a LAS file. Because each VLR’s size is in its header, readers must process VLRs sequentially to find the next one. [LAS specification]
Quick Recap
Best Value
Rank #4
What should you check when a format says “variable-length”?
- Boundary encoding: Find out whether the format uses a length prefix, a prefix and suffix, or another framing method.
- Maximum size: Check the limit for the specific format or implementation; there is no universal maximum.
- Traversal: Determine whether the layout supports backward stepping or requires forward scanning.
- Overflow: Check whether a record can span blocks or pages and how continuation data is represented.
- Compatibility: Confirm that the reader supports the relevant format version and its conventions.
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.




