DSNTYPE Parameter

Purpose

The DSNTYPE (Dataset Type) parameter specifies the type or structure of a dataset being allocated. It defines the physical and logical organization of data, affecting how the dataset can be used, its performance characteristics, and its maximum size limits.

Key Benefit:

DSNTYPE allows you to take advantage of different storage architectures and capabilities in z/OS, providing options like extended-format datasets for larger storage capacities, library structures for program management, and specific format optimizations.

Where DSNTYPE is Used

  • In DD statements for dataset allocation
  • In TSO ALLOCATE commands
  • In IDCAMS DEFINE commands (indirectly)
  • In dynamic allocation services (SVC 99)
  • Within SMS data class definitions

Basic Syntax

jcl
1
2
3
//ddname DD DSN=dataset.name, // DSNTYPE=value, // ...other parameters...

Where value is one of the supported dataset type values.

DSNTYPE Values

ValueDescriptionKey Features
BASICStandard physical sequential datasetTraditional format, limited to 65,535 tracks per volume
LARGELarge format sequential datasetSupports more than 65,535 tracks per volume
EXTREQExtended format requiredMust be allocated as extended format (fails if not possible)
EXTPREFExtended format preferredAttempts extended format, but falls back to basic if needed
HFSHierarchical File SystemLegacy Unix-style filesystem (superseded by zFS)
LIBRARYPDSE (Partitioned Dataset Extended)Enhanced PDS with dynamic space management, no compression need
PDSPartitioned DatasetTraditional library format with directory, needs compression
PIPEUNIX pipe/FIFO special fileFor inter-process communication in USS environments
TEMPTemporary, system-managed datasetAutomatically deleted at end of job/session
EXTENDEDExtended format sequentialSame as EXTREQ (older syntax)

Additional DSNTYPE Specifications

Beginning with z/OS 1.13, DSNTYPE can be specified with additional attributes using the following format:

jcl
1
DSNTYPE=(type,format)
FormatDescription
DSNTYPE=(LIBRARY,1) or DSNTYPE=(LIBRARY,PROGRAM)PDSE for program objects (load modules)
DSNTYPE=(LIBRARY,2) or DSNTYPE=(LIBRARY,DATA)PDSE for data members
DSNTYPE=(EXTREQ,REDO)Extended format with REDO logging capability
DSNTYPE=(EXTREQ,NOREDO)Extended format without REDO logging

Note:

Not all DSNTYPE values are supported in all z/OS environments. Support depends on hardware capabilities, SMS configuration, and the version of the operating system.

DSNTYPE and Other Parameters Interaction

DSNTYPERequired ParametersIncompatible Parameters
BASICNone specificCOMPACTION
LARGENone specificCOMPACTION, DIR (directory blocks)
EXTREQ/EXTPREFSTORCLAS with appropriate settingsDIR (directory blocks)
LIBRARYNone specificKEYLEN > 0 (VSAM key definition)
PDSDIR (directory blocks in SPACE parameter)KEYLEN > 0 (VSAM key definition)
HFS/zFSDATACLAS with appropriate settingsMost DCB parameters

Usage Examples

Basic Sequential Dataset

jcl
1
2
3
4
5
//SEQFILE DD DSN=USER.BASIC.FILE, // DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(10,5)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920), // DSNTYPE=BASIC

This example creates a standard sequential dataset with traditional format.

Large Format Dataset

jcl
1
2
3
4
5
//LARGEFILE DD DSN=USER.LARGE.FILE, // DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(100000,10000)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920), // DSNTYPE=LARGE

This example creates a large format sequential dataset that can exceed 65,535 tracks per volume.

Program Library (PDSE)

jcl
1
2
3
4
5
//LOADLIB DD DSN=USER.PDSE.LOADLIB, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(10,5)), // DCB=(RECFM=U,BLKSIZE=32760), // DSNTYPE=(LIBRARY,1)

This example creates a PDSE library for program objects (load modules) with format 1 specification.

Data Library (PDSE)

jcl
1
2
3
4
5
//SRCLIB DD DSN=USER.PDSE.SOURCE, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,2)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920), // DSNTYPE=(LIBRARY,2)

This example creates a PDSE library for data members (like source code) with format 2 specification.

Traditional PDS

jcl
1
2
3
4
5
//PDSFILE DD DSN=USER.PDS.DATA, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,2,50)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920), // DSNTYPE=PDS

This example creates a traditional partitioned dataset with 50 directory blocks.

Extended Format Dataset

jcl
1
2
3
4
5
6
//EXTFILE DD DSN=USER.EXTENDED.DATA, // DISP=(NEW,CATLG,DELETE), // STORCLAS=EXTENDED, // SPACE=(CYL,(100,50)), // DCB=(RECFM=FB,LRECL=1024,BLKSIZE=27648), // DSNTYPE=EXTREQ

This example creates an extended format dataset, requiring the allocation to fail if extended format cannot be provided.

Key Characteristics by DSNTYPE

Basic vs. Large vs. Extended Formats

FeatureBasic FormatLarge FormatExtended Format
Maximum Size65,535 tracks per volume16,777,215 tracks per volume16,777,215 tracks per volume
Multi-volume SupportLimitedEnhancedEnhanced
Advanced FeaturesNoneNoneCompression, Striping, etc.
SMS RequirementNoNoYes
Common Use CaseStandard datasets < 65,535 tracksLarge sequential datasetsHigh-performance or specialized datasets
Size Limitations< 65,535 tracksNo practical limitVaries by implementation

PDS vs. LIBRARY (PDSE) Comparison

FeaturePDSLIBRARY (PDSE)
Directory StructureFixed size, pre-allocatedDynamic, self-extending
Space ReuseRequires compressionAutomatic
Member SharingLimited (dataset level)Enhanced (member level)
Program ObjectsLimited size (16MB)Extended (2GB)
RecoveryMinimalEnhanced integrity

Technical Considerations

Extended Format Benefits

  • Compression: Data compression can reduce storage requirements
  • Striping: Data can be spread across multiple volumes for improved I/O performance
  • Extended Addressability: Supports datasets larger than 4GB
  • System-Managed Buffering: Enhanced buffer management for VSAM datasets
  • Extended Format CI Size: Control interval size can be larger than 32K

PDSE Benefits

  • No Compression Needed: PDSEs reclaim space automatically when members are deleted
  • Flexible Directory: Directory expands dynamically as needed
  • Member Generations: Can maintain multiple versions of program objects
  • Integrity: Better recovery from system failures
  • Sharing: Enhanced member-level sharing for improved concurrency

PDSE Limitations:

PDSEs cannot be placed on tape, and they have different utility support compared to standard PDS libraries. Also, some older applications might not be compatible with PDSE format.

Common Issues and Troubleshooting

IssuePossible CausesSolutions
DSNTYPE allocation failureRequested type not supported by hardware/configuration
  • Use EXTPREF instead of EXTREQ to allow fallback
  • Check SMS configuration
  • Verify DFSMS settings
Space allocation issuesDSNTYPE inconsistent with SPACE parameter
  • For PDS, ensure directory blocks are specified
  • For LIBRARY, directory blocks not needed
Access method incompatibilityProgram not compatible with dataset type
  • Verify program supports PDSE if using LIBRARY
  • Check program compatibility with extended format
Performance issuesSuboptimal DSNTYPE for workload
  • Use extended format with striping for high-performance sequential
  • Use LIBRARY for frequently updated libraries
PDSE sharing conflictsIncompatible sharing options
  • Check IGDSMSxx PARMLIB settings for PDSE_SHARING
  • Verify cross-system sharing configuration

Best Practices

  1. Use LIBRARY Instead of PDS: For most new library allocations, prefer PDSE (LIBRARY) over traditional PDS to avoid compression requirements and directory limitations.
  2. Format Selection for Program Libraries: Use DSNTYPE=(LIBRARY,1) for load module libraries and DSNTYPE=(LIBRARY,2) for data libraries.
  3. Large Datasets: Use LARGE or EXTREQ for datasets that might exceed the 65,535 tracks per volume limit.
  4. Fallback Strategy: When extended format is desired but not critical, use EXTPREF instead of EXTREQ to allow fallback to basic format.
  5. SMS Integration: Coordinate DSNTYPE with appropriate STORCLAS and DATACLAS settings for optimal performance and functionality.
  6. Compression Consideration: Use extended format (EXTREQ) with COMPACTION=YES for datasets with high compressibility to save space.
  7. Performance Optimization: Use extended format with striping for high-performance sequential processing of large files.
  8. Compatibility Awareness: Be aware of older applications that might not support newer dataset types like PDSE or extended format.

JES2 vs JES3 Considerations

DSNTYPE is primarily a data management parameter rather than a job entry subsystem parameter, so it functions identically in both JES2 and JES3 environments. However, there are a few system-level considerations:

FeatureConsiderations
Spool datasetsJES2 and JES3 use their own specialized formats for spool datasets, not controlled by DSNTYPE
Checkpoint datasetsJES2 and JES3 have specific requirements for checkpoint datasets that interact with storage management
System datasetsBoth JES2 and JES3 environments support all DSNTYPE values for user datasets

Note:

Since z/OS 2.5, JES3 has been replaced by JES3plus (a compatible product), but DSNTYPE behavior remains unchanged.

Related Concepts