Dataset
What a mainframe calls a file: a named set of records with a shape the system knows.
Also written file, data set
Why it matters. Everything the bank keeps, from customers to JCL, is a dataset. Programs open them by name.
See it
Read a name
Tap a dataset to read its name, then open it.
PO. Partitioned: a drawer of folders, with members inside.
Zed's, in development, holding jobs. A library, so it has members.
Members
Tap a member to open it.
Syntax
LISTDS 'dsname' [MEMBERS] [STATUS] [HISTORY] [LABEL]
- DSORG PS
- Physical sequential: a plain file.
- DSORG PO
- Partitioned: a library of members.
- RECFM
- F, V or U, and B if blocked.
- LRECL
- Record length.
- BLKSIZE
- Block length.
- MEMBERS
- List the member names of a library.
Try it LISTDS
- 1
Look at the details of the customer file, ZBANK.DATA.CUSTOMER.
LISTDS 'ZBANK.DATA.CUSTOMER' - 2
Now look at the library ZBANK.DEV.JCL.
LISTDS 'ZBANK.DEV.JCL'
Remember
- A dataset is a file with a shape the system knows.
- RECFM, LRECL and BLKSIZE say what the shape is.
- PS is a plain file. PO is a library of members.
The usual mistake
Treating a dataset as a loose stream of text.
A program expects records of a set length and format. A file of another shape breaks it.
Check RECFM and LRECL with LISTDS before you use a file.
On real z/OS
MF/OS prints a LISTDS layout close to the real one. Real LISTDS can also show the creation date, space used and the catalog entry with STATUS or HISTORY, which are not all modelled. Datasets also come as VSAM and USS files, which LISTDS does not describe the same way.
Where can I practise Dataset?
Right here, at ZedBank. You take a junior job at a simulated bank and use Dataset in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- Dataset nameThe full name of a dataset, written as dot-separated qualifiers of up to eight characters each.
- Sequential datasetThe simplest kind of dataset: records stored one after another and normally read from start to finish.
- 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.
- Record formatWhether the records in a dataset are all the same length or vary, and how they are blocked. Written as RECFM.
- CatalogThe system's index of where datasets live, so you can refer to a dataset by name without knowing which disk it is on.
- Generation data groupA set of datasets holding successive versions of the same file, so today's copy, yesterday's and last week's all exist under one name.