Partitioned dataset
A dataset that works like a library: many named members inside one dataset.
Also written PDS, library, source library
Why it matters. The bank keeps its programs and jobs in libraries like this. One library, one member for each job.
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
ALLOCATE DATASET('name') NEW DSORG(PO) DIR(n) SPACE(p,s) TRACKS
//ddname DD DSN=name,DISP=(NEW,CATLG),DSNTYPE=PDS,DCB=(DSORG=PO),SPACE=(TRK,(5,5,10))- DSORG(PO)
- A partitioned dataset.
- DIR(n)
- Directory blocks. Fixed when the library is made.
- SPACE(p,s)
- Primary and secondary space.
- RECFM, LRECL
- Shape of the records inside the members.
- Compress
- Gather the gaps left by replaced members (IEBCOPY).
Try it ALLOC
- 1
Make a new library, ZB0001.DEV.NOTES. Make it a partitioned dataset with room for 5 directory blocks.
ALLOC DSN('ZB0001.DEV.NOTES') NEW DSORG(PO) DIR(5) SPACE(1,1) TRACKS - 2
List the members of the new library.
LISTDS 'ZB0001.DEV.NOTES' MEMBERS
Remember
- A PDS is a directory plus members.
- It is how source code and JCL are kept.
- Add MEMBERS to LISTDS to see what is inside.
The usual mistake
ALLOC DSN('ZB0001.DEV.NOTES') NEW DSORG(PS), then saving NOTES(A)
A plain sequential file has no directory, so it has no members.
Make the library with DSORG(PO) and a DIR value
On real z/OS
MF/OS does not model the directory filling up or gaps left by replaced members, so the classic S0C4 or E37 problems of a full PDS do not happen here. The directory size is accepted but not enforced.
Where can I practise Partitioned dataset?
Right here, at ZedBank. You take a junior job at a simulated bank and use Partitioned dataset in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- MemberOne named item inside a partitioned dataset, such as a single program, job or copybook within a library.
- PDSEThe modern version of a partitioned dataset, which reclaims space automatically and removes the old size limits.
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.
- ISPF editorThe full-screen text editor used to write and change JCL, COBOL, REXX and anything else held in a dataset.
- Sequential datasetThe simplest kind of dataset: records stored one after another and normally read from start to finish.