Skip to main content

Introduction to Files in Mainframe

If you’re coming from a PC or Unix background, you’re used to working with "files." But in the mainframe world, things are a bit different. This handout explains what a data set is, how it differs from regular files, and why understanding this difference is important when working with z/OS.

What Is a Data Set?

  • A data set is the mainframe equivalent of a file—but structured to hold records.
  • Records are fixed or variable-length chunks of data, used directly by programs.
  • Some datasets store text (e.g., code), others store binary (e.g., executables or load modules).

Key Differences

ConceptPC/Unix FileMainframe Data Set (z/OS)
Basic unitFileData Set
StructureByte streamRecord-based
File types.txt, .exe, .csv, etc.SEQ, PDS, PDSE, VSAM, etc.
Storage methodStored in foldersManaged by z/OS, often cataloged
Access methodByte-based (e.g., stream)Record-based (fixed or variable)

Cataloged vs. Non-Cataloged

TermWhat It MeansWhy It Matters
Catalogedz/OS knows where the data set is storedYou can access it using just its name
Non-CatalogedYou need volume and device infoHarder to locate manually

Think of the catalog like a search index on your PC. If it's in the index, the system can find it fast.

Common Misconceptions

MisconceptionReality
“All files are readable”Load modules (executables) aren’t meant to be opened
“Data sets are folders like on Windows”Only PDS/PDSE have members; other datasets don't
“Catalog = Folder”Catalog = Index; it helps find the data, not hold it
“You can read records like lines in Notepad”Only if it's a text-based dataset with readable encoding