Mainframe datasets come in different types, each designed for specific purposes and access patterns. Understanding dataset types is essential for effective data management. This tutorial covers PS (Physical Sequential), PDS (Partitioned Data Set), PDSE (Partitioned Data Set Extended), VSAM (Virtual Storage Access Method), and GDG (Generation Data Group), explaining their characteristics, uses, and differences.
Each dataset type has unique properties that make it suitable for different scenarios. Understanding when to use each type helps you design efficient data structures and choose the right organization for your data.
Understanding Dataset Organization
Dataset organization (DSORG) determines how data is structured and accessed.
What is DSORG?
DSORG (Data Set Organization):
Specifies how data is organized in the dataset
Determines access methods available
Affects dataset capabilities
Is set when the dataset is created
Cannot be changed after creation
Common DSORG Values
Common DSORG values include:
PS: Physical Sequential
PO: Partitioned Organization (PDS)
PO-E: Partitioned Organization Extended (PDSE)
DA: Direct Access (VSAM)
Other specialized organizations
PS - Physical Sequential
PS (Physical Sequential) datasets are simple sequential files.
What is PS?
PS datasets:
Are simple sequential files
Store records one after another
Have no internal structure
Are accessed sequentially from start to end
Are the simplest dataset type
PS Characteristics
PS datasets have:
DSORG=PS
Single file structure
Sequential access only
No members or partitions
Simple structure
When to Use PS
Use PS for:
Simple data files
Report files
Log files
Data that is processed sequentially
Files that don't need internal structure
PS Example
Example PS dataset:
text
1
2
3
4
USERID.DATA.INPUT
DSORG=PS
RECFM=FB
LRECL=80
This is a simple sequential data file.
PDS - Partitioned Data Set
PDS (Partitioned Data Set) contains multiple members in one dataset.
Document Type Choices: Document why specific types were chosen
Explain Like I'm 5: Dataset Types
Think of dataset types like different kinds of storage containers:
PS (Sequential) is like a single long scroll. You write things on it one after another, and to read it, you start at the beginning and read to the end. It's like one big continuous piece of paper!
PDS (Partitioned) is like a filing cabinet with drawers. Each drawer has a label (member name), and you can open any drawer to get that specific file. It's like having a cabinet where you can organize many files!
PDSE (Extended Partitioned) is like a super-smart filing cabinet. It's like a regular filing cabinet, but it organizes itself automatically, can hold more files, and works faster. It's like having a magic filing cabinet that takes care of itself!
VSAM is like a super-organized library with an index. You can find things by looking them up in an index (like a book index), or you can go directly to a specific shelf. It's like having a library with a smart catalog system!
GDG (Generation Data Group) is like a series of photo albums for the same event. You have "Vacation Day 1", "Vacation Day 2", "Vacation Day 3", etc. Each album is numbered, and you can easily refer to "today's album" or "yesterday's album"! It's like having numbered versions of the same thing!
So dataset types are like different ways of organizing and storing your information, each designed for different needs—simple files, organized cabinets, smart systems, or versioned collections!
Practice Exercises
Complete these exercises to reinforce your understanding of dataset types:
Exercise 1: Identifying Dataset Types
Practice identification: view dataset attributes using Data Set Utility, identify DSORG values, determine dataset types, and understand type characteristics. Build familiarity with dataset types.
Exercise 2: Working with PDS and PDSE
Practice partitioned datasets: work with PDS and PDSE datasets, compare their behavior, understand member operations, and learn the differences. Master partitioned dataset concepts.
Exercise 3: Understanding VSAM
Practice VSAM: explore VSAM datasets if available, understand VSAM characteristics, learn about VSAM types, and understand when VSAM is appropriate. Learn VSAM concepts.
Exercise 4: Working with GDG
Practice GDG: identify GDG datasets, understand generation numbering, use relative references, and understand GDG concepts. Master GDG operations.
Exercise 5: Type Selection
Practice selection: identify which dataset type to use for different scenarios (source code, data files, reports, etc.), understand selection criteria, and make appropriate choices. Build decision-making skills.
Test Your Knowledge
1. What does PS stand for in dataset types?
Partitioned Sequential
Physical Sequential
Partitioned Set
Physical Set
2. What is the difference between PDS and PDSE?
They are identical
PDSE is an enhanced version with better performance
PDS is newer
PDSE is obsolete
3. What does VSAM stand for?
Virtual Storage Access Method
Variable Storage Access Method
Virtual Sequential Access Method
Variable Sequential Access Method
4. What is a GDG?
A dataset type
A collection of related datasets with generation numbers