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.
123//ddname DD DSN=dataset.name, // DSNTYPE=value, // ...other parameters...
Where value
is one of the supported dataset type values.
Value | Description | Key Features |
---|---|---|
BASIC | Standard physical sequential dataset | Traditional format, limited to 65,535 tracks per volume |
LARGE | Large format sequential dataset | Supports more than 65,535 tracks per volume |
EXTREQ | Extended format required | Must be allocated as extended format (fails if not possible) |
EXTPREF | Extended format preferred | Attempts extended format, but falls back to basic if needed |
HFS | Hierarchical File System | Legacy Unix-style filesystem (superseded by zFS) |
LIBRARY | PDSE (Partitioned Dataset Extended) | Enhanced PDS with dynamic space management, no compression need |
PDS | Partitioned Dataset | Traditional library format with directory, needs compression |
PIPE | UNIX pipe/FIFO special file | For inter-process communication in USS environments |
TEMP | Temporary, system-managed dataset | Automatically deleted at end of job/session |
EXTENDED | Extended format sequential | Same as EXTREQ (older syntax) |
Beginning with z/OS 1.13, DSNTYPE can be specified with additional attributes using the following format:
1DSNTYPE=(type,format)
Format | Description |
---|---|
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 | Required Parameters | Incompatible Parameters |
---|---|---|
BASIC | None specific | COMPACTION |
LARGE | None specific | COMPACTION, DIR (directory blocks) |
EXTREQ/EXTPREF | STORCLAS with appropriate settings | DIR (directory blocks) |
LIBRARY | None specific | KEYLEN > 0 (VSAM key definition) |
PDS | DIR (directory blocks in SPACE parameter) | KEYLEN > 0 (VSAM key definition) |
HFS/zFS | DATACLAS with appropriate settings | Most DCB parameters |
12345//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.
12345//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.
12345//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.
12345//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.
12345//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.
123456//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.
Feature | Basic Format | Large Format | Extended Format |
---|---|---|---|
Maximum Size | 65,535 tracks per volume | 16,777,215 tracks per volume | 16,777,215 tracks per volume |
Multi-volume Support | Limited | Enhanced | Enhanced |
Advanced Features | None | None | Compression, Striping, etc. |
SMS Requirement | No | No | Yes |
Common Use Case | Standard datasets < 65,535 tracks | Large sequential datasets | High-performance or specialized datasets |
Size Limitations | < 65,535 tracks | No practical limit | Varies by implementation |
Feature | PDS | LIBRARY (PDSE) |
---|---|---|
Directory Structure | Fixed size, pre-allocated | Dynamic, self-extending |
Space Reuse | Requires compression | Automatic |
Member Sharing | Limited (dataset level) | Enhanced (member level) |
Program Objects | Limited size (16MB) | Extended (2GB) |
Recovery | Minimal | Enhanced integrity |
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.
Issue | Possible Causes | Solutions |
---|---|---|
DSNTYPE allocation failure | Requested type not supported by hardware/configuration |
|
Space allocation issues | DSNTYPE inconsistent with SPACE parameter |
|
Access method incompatibility | Program not compatible with dataset type |
|
Performance issues | Suboptimal DSNTYPE for workload |
|
PDSE sharing conflicts | Incompatible sharing options |
|
DSNTYPE=(LIBRARY,1)
for load module libraries and DSNTYPE=(LIBRARY,2)
for data libraries.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:
Feature | Considerations |
---|---|
Spool datasets | JES2 and JES3 use their own specialized formats for spool datasets, not controlled by DSNTYPE |
Checkpoint datasets | JES2 and JES3 have specific requirements for checkpoint datasets that interact with storage management |
System datasets | Both 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.