The z/OSĀ and its predecessors (MVS, OS/360) existed far before the appearance of SQL and databases. The file system were designed historically for data management and processing. The data sets were pillars of structured data management. The DB2, IMS and other mainframe databases were built based on this model. In mainframe there are no folders and files but data sets.
A data set is not a database: it can not build an index (except VSAM), there is no query language, no transactions, no multi-user locking, no scheme or data type definition. These are handled by applications or databases. However, it is structured, record-orientated, contains metadata.
A data set is generally a file which contains data organized into records.
Data set naming rules:
the full name length is maximum 44 characters
the full name is separated by dots to qualifiers (from left to right these mark an entity from wider definitions toward narrower definition, in other words, to narrow them down by classifying)
a qualifier is maximum 8 characters, can contain A..Z, 0..9, @, #, $, can not start with a number, can not be blank, can not contain space
examples: MYUSER.PROJECT.LOADLIB, SYS1.PARMLIB, DEV.TESZT01.DATA, PRODUCTS.RETAIL.OUTDOOR.SUMMER
special case for the Generation Data Group (GDG), after the last character there is a generation reference (0: actual, +1: next, -1: previous), example: MYUSER.REPORTS.GDG(+1)
Names are caseāinsensitive but the system always converts them to upcase.
For data sets, although the system does not make it obligatory, many organizations use the last qualifier to mark the data set type for better readability:
DATA, SEQ, SEQDS, SDS, IN, INPUT, OUT, OUTPUT (PS/SDS)
LIB, JCL, PARMLIB, SOURCE (PDS)
KSDS, ESDS, RRDS (marking the VSAM type)
e.g. MYUSER.SEQ, INVENTORY.RESERVES.SMALL.SOURCE, CUSTOMER.ACCOUNT.TRANSFER.KSDS
In case a dataset or a member is used, the system puts a lock on it. This has an effect on how programs and users can access the storage.