Progress0 of 0 lessons

How to Allocate Datasets from ISPF

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.

Accessing Allocation

You can allocate datasets through Data Set Utility or using commands.

Using Data Set Utility

To allocate using Data Set Utility:

  • Select Option 3.2 (Data Set Utility)
  • Choose the Allocate option
  • Enter dataset attributes
  • Specify space allocation
  • Execute the allocation

Using ALLOCATE Command

You can also use the ALLOCATE command from TSO or ISPF command line. The command syntax varies, but typically includes dataset name and attributes.

Required Allocation Attributes

When allocating, you must specify key attributes.

Essential Attributes

Required attributes include:

  • Data Set Name: The name of the dataset
  • DSORG: Data Set Organization (PS, PO, PO-E, etc.)
  • RECFM: Record Format (F, FB, V, VB, etc.)
  • LRECL: Logical Record Length
  • BLKSIZE: Block Size
  • Space: Primary and secondary space allocation

Optional Attributes

Optional attributes may include:

  • Volume serial (system can assign)
  • Catalog option (typically YES)
  • Expiration date
  • Other dataset-specific options

Common Allocation Patterns

Here are common allocation patterns for different purposes.

COBOL Source Library (PDS)

For COBOL source code libraries:

text
1
2
3
4
5
6
7
8
9
Data 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.

COBOL Source Library (PDSE)

For COBOL source using PDSE:

text
1
2
3
4
5
6
7
8
9
Data 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.

JCL Library (PDS)

For JCL libraries:

text
1
2
3
4
5
6
7
8
9
Data Set Name: USERID.SOURCE.JCL DSORG: PO RECFM: FB LRECL: 80 BLKSIZE: 3120 Space Units: TRACKS Primary: 5 Secondary: 2 Catalog: YES

Sequential Data File

For sequential data files:

text
1
2
3
4
5
6
7
8
9
Data 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

Wide Report File

For wide format reports:

text
1
2
3
4
5
6
7
8
9
Data Set Name: USERID.REPORTS.OUTPUT DSORG: PS RECFM: FB LRECL: 132 BLKSIZE: 27984 Space Units: TRACKS Primary: 5 Secondary: 2 Catalog: YES

Variable-Length Data File

For variable-length data:

text
1
2
3
4
5
6
7
8
9
Data 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

Space allocation determines how much disk space is reserved.

Space Units

Common space units:

  • TRACKS: Allocate in tracks (common for small to medium datasets)
  • CYLINDERS: Allocate in cylinders (common for large datasets)
  • BLOCKS: Allocate in blocks (less common)

Primary and Secondary

Space allocation includes:

  • Primary: Initial space allocation
  • Secondary: Additional space when primary is exhausted
  • System allocates secondary automatically when needed
  • Multiple secondary allocations can occur

Space Allocation Guidelines

Guidelines for space allocation:

  • Source libraries: 10-20 primary tracks, 5-10 secondary
  • Data files: Estimate based on expected volume
  • PDS: Consider number of expected members
  • Start conservatively, can extend if needed

BLKSIZE Calculation

BLKSIZE is typically calculated from LRECL and RECFM.

Common BLKSIZE Values

Common calculations:

  • LRECL=80, RECFM=FB: BLKSIZE=3120 (39 records per block)
  • LRECL=132, RECFM=FB: BLKSIZE=27984 (212 records per block)
  • LRECL=80, RECFM=VB: BLKSIZE=27998 (variable)
  • System can calculate automatically

BLKSIZE Guidelines

BLKSIZE should be:

  • A multiple of LRECL (for fixed format)
  • Optimized for the storage device
  • Large enough for efficiency
  • Within device limits

Allocation Process

The step-by-step allocation process.

Step 1: Access Data Set Utility

Select Option 3.2 from ISPF Utilities.

Step 2: Choose Allocate

Select the Allocate option from the Data Set Utility menu.

Step 3: Enter Dataset Name

Enter the dataset name following naming conventions.

Step 4: Specify Attributes

Enter DSORG, RECFM, LRECL, BLKSIZE, and other attributes.

Step 5: Specify Space

Enter space units, primary quantity, and secondary quantity.

Step 6: Set Options

Set catalog option and other preferences.

Step 7: Execute

Execute the allocation. The dataset is created.

Best Practices

Following best practices helps you allocate datasets effectively:

  • Use Appropriate Attributes: Match attributes to your needs
  • Follow Naming Conventions: Use consistent naming
  • Estimate Space Realistically: Allocate appropriate space
  • Catalog Datasets: Catalog for easy access
  • Use PDSE When Possible: Prefer PDSE for new PDS
  • Document Allocations: Keep notes on allocation patterns
  • Verify After Allocation: Verify dataset was created correctly
  • Consider Future Growth: Plan for dataset growth

Common Mistakes

Avoiding common allocation mistakes.

Common Errors

Common mistakes include:

  • Incorrect LRECL for the data type
  • Mismatched RECFM and LRECL
  • Insufficient space allocation
  • Forgetting to catalog
  • Wrong DSORG for the purpose

Explain Like I'm 5: Allocating Datasets

Think of allocating a dataset like setting up a new notebook:

  • Allocating is like getting a new notebook and deciding how it should be set up. You say "I want a notebook with 80 lines per page, all pages the same size, and I need space for 100 pages." It's like ordering a custom notebook with specific features!
  • Attributes are like the specifications for your notebook. You decide how long each line should be (LRECL), whether all pages are the same size (RECFM), and how the notebook is organized (DSORG). It's like choosing all the details for your notebook!
  • Space Allocation is like deciding how many pages your notebook should have. You say "I want 100 pages to start with, and if I need more, add 50 more pages." It's like reserving space for your writing!

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!

Practice Exercises

Complete these exercises to reinforce your understanding of dataset allocation:

Exercise 1: Basic Allocation

Practice allocation: allocate a test sequential dataset, specify appropriate attributes, verify the dataset was created, and understand the allocation process. Learn basic allocation.

Exercise 2: PDS 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.

Exercise 3: PDSE Allocation

Practice PDSE allocation: allocate a test PDSE, compare with PDS allocation, understand PDSE advantages, and learn PDSE allocation. Master PDSE allocation.

Exercise 4: Space 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.

Exercise 5: Allocation Patterns

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.

Test Your Knowledge

1. How do you allocate a dataset from ISPF?

  • Use Option 3.2 Data Set Utility
  • Use Option 2 Editor
  • Use Option 1 Browse
  • Use Option 0 Settings

2. What is a common LRECL for COBOL source?

  • 72
  • 80
  • 132
  • 256

3. What DSORG is used for PDS?

  • PS
  • PO
  • DA
  • VS

4. Should you typically catalog datasets when allocating?

  • No, never
  • Yes, usually
  • Only for PDS
  • Only for sequential

5. What does space allocation specify?

  • Only file size
  • Primary and secondary space amounts
  • Only block size
  • Only record length

Related Concepts