Record format
Whether the records in a dataset are all the same length or vary, and how they are blocked. Written as RECFM.
Also written RECFM, record type
Record format, abbreviated RECFM, describes the shape of the records in a dataset. It is one of the attributes fixed when a dataset is created, and everything that opens the dataset afterwards relies on it.
The letters are compact. F means fixed length, where every record is exactly the same size. V means variable, where each record carries its own length. B means blocked, meaning several records are grouped together for efficient storage and transfer. A trailing A means the first character of each record is a printer control character. So FB is fixed-length blocked records, the most common format you will see, and VB is variable-length blocked.
Source code libraries are conventionally FB with 80-character records, a length inherited from punched cards. Reports and print output are often variable, since lines differ in length.
Getting the format wrong is a common early error. A program expecting fixed 80-character records and given variable ones will fail or produce nonsense, and the message you get back points at exactly this mismatch.
Related terms
- Logical record lengthHow long each record in a dataset is, in characters, written as LRECL.
- Block sizeHow much data is moved between disk and memory in one go, written as BLKSIZE.
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.
- Sequential datasetThe simplest kind of dataset: records stored one after another and normally read from start to finish.