October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

What Is a Variable-Length Record? Definition, Examples, and How It Works

A variable-length record can differ in size from other records in the same file. Its format defines how to find its boundary and handle size limits.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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

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.

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.

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.

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

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.Support on Ko-Fi

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]

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.

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
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

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.