Allocating (creating) datasets from ISPF involves specifying dataset attributes and space requirements. You can allocate datasets using Data Set Utility (Option 3.2) or the ALLOCATE command. Understanding allocation patterns helps you create datasets with appropriate attributes for different purposes. This tutorial covers the allocation process, required attributes, common allocation patterns for different dataset types, and best practices.
Proper dataset allocation is essential for creating datasets that meet your needs. Understanding allocation patterns helps you choose appropriate attributes and avoid common mistakes. This tutorial provides practical guidance for allocating datasets effectively.
You can allocate datasets through Data Set Utility or using commands.
To allocate using Data Set Utility:
You can also use the ALLOCATE command from TSO or ISPF command line. The command syntax varies, but typically includes dataset name and attributes.
When allocating, you must specify key attributes.
Required attributes include:
Optional attributes may include:
Here are common allocation patterns for different purposes.
For COBOL source code libraries:
123456789Data Set Name: USERID.SOURCE.COBOL DSORG: PO (or PO-E for PDSE) RECFM: FB LRECL: 80 BLKSIZE: 3120 Space Units: TRACKS Primary: 10 Secondary: 5 Catalog: YES
This creates a partitioned dataset for COBOL source code.
For COBOL source using PDSE:
123456789Data Set Name: USERID.SOURCE.COBOL DSORG: PO-E RECFM: FB LRECL: 80 BLKSIZE: 3120 Space Units: TRACKS Primary: 10 Secondary: 5 Catalog: YES
This creates a PDSE with better performance and features.
For JCL libraries:
123456789Data Set Name: USERID.SOURCE.JCL DSORG: PO RECFM: FB LRECL: 80 BLKSIZE: 3120 Space Units: TRACKS Primary: 5 Secondary: 2 Catalog: YES
For sequential data files:
123456789Data Set Name: USERID.DATA.INPUT DSORG: PS RECFM: FB LRECL: 80 (or appropriate for your data) BLKSIZE: 27920 (calculated) Space Units: TRACKS Primary: 10 Secondary: 5 Catalog: YES
For wide format reports:
123456789Data Set Name: USERID.REPORTS.OUTPUT DSORG: PS RECFM: FB LRECL: 132 BLKSIZE: 27984 Space Units: TRACKS Primary: 5 Secondary: 2 Catalog: YES
For variable-length data:
123456789Data Set Name: USERID.DATA.VARIABLE DSORG: PS RECFM: VB LRECL: 256 (maximum) BLKSIZE: 27998 Space Units: TRACKS Primary: 10 Secondary: 5 Catalog: YES
Space allocation determines how much disk space is reserved.
Common space units:
Space allocation includes:
Guidelines for space allocation:
BLKSIZE is typically calculated from LRECL and RECFM.
Common calculations:
BLKSIZE should be:
The step-by-step allocation process.
Select Option 3.2 from ISPF Utilities.
Select the Allocate option from the Data Set Utility menu.
Enter the dataset name following naming conventions.
Enter DSORG, RECFM, LRECL, BLKSIZE, and other attributes.
Enter space units, primary quantity, and secondary quantity.
Set catalog option and other preferences.
Execute the allocation. The dataset is created.
Following best practices helps you allocate datasets effectively:
Avoiding common allocation mistakes.
Common mistakes include:
Think of allocating a dataset like setting up a new notebook:
So allocating a dataset is like ordering a custom notebook with all the specifications you need, and the system creates it exactly how you want it!
Complete these exercises to reinforce your understanding of dataset allocation:
Practice allocation: allocate a test sequential dataset, specify appropriate attributes, verify the dataset was created, and understand the allocation process. Learn basic allocation.
Practice PDS allocation: allocate a test PDS for source code, use appropriate attributes for COBOL, verify the PDS was created, and understand PDS allocation. Master PDS allocation.
Practice PDSE allocation: allocate a test PDSE, compare with PDS allocation, understand PDSE advantages, and learn PDSE allocation. Master PDSE allocation.
Practice space allocation: allocate datasets with different space amounts, understand primary and secondary allocation, test space limits, and learn space planning. Master space allocation.
Practice patterns: allocate datasets for different purposes (source code, data files, reports), use appropriate patterns, verify allocations, and build a library of allocation patterns. Master allocation patterns.
1. How do you allocate a dataset from ISPF?
2. What is a common LRECL for COBOL source?
3. What DSORG is used for PDS?
4. Should you typically catalog datasets when allocating?
5. What does space allocation specify?