Sequential dataset
The simplest kind of dataset: records stored one after another and normally read from start to finish.
Also written PS, physical sequential, flat file
A sequential dataset holds records in order, one after the next, with no index and no named subdivisions. To reach the hundredth record you read the ninety-nine before it. The formal name for the organisation is physical sequential, which is why you will see it written as PS.
This is the workhorse format for batch. Extract files, transaction files, reports, input to a sort, output from a program. All of it is usually sequential, because batch processing naturally reads a whole file from beginning to end anyway.
Creating one means deciding a few things up front: how long the records are, whether they are all the same length, and how much space to allocate. Those attributes are recorded with the dataset and everything that opens it afterwards can find out what to expect.
Its limitation is the flip side of its simplicity. There is no way to jump to a particular record by key, and no way to hold several separately named things in one dataset. Those needs are what VSAM and partitioned datasets exist for.
Related terms
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.
- Record formatWhether the records in a dataset are all the same length or vary, and how they are blocked. Written as RECFM.
- Logical record lengthHow long each record in a dataset is, in characters, written as LRECL.
- Partitioned datasetA dataset that works like a library or folder, holding many separately named members inside one dataset.
- VSAMA family of dataset types built for fast record access by key, used where applications need to look records up rather than read them in order.