VOLUME Parameter

Purpose

The VOLUME parameter (often abbreviated as VOL) identifies the volume or volumes on which a data set resides or should be created. It allows you to specify exact disk or tape volumes for data set allocation or retrieval, enabling precise control over data placement in the mainframe environment.

Syntax

Basic Format

jcl
1
//ddname DD VOLUME=SER=volser

Or using the abbreviated form:

jcl
1
//ddname DD VOL=SER=volser

Extended Format

jcl
1
//ddname DD VOLUME=(PRIVATE[,RETAIN][,seq][,volcount][,SER=(vol1,vol2,...)])

Reference Format

jcl
1
//ddname DD VOLUME=REF=*.stepname.ddname

Or referencing a cataloged data set:

jcl
1
//ddname DD VOLUME=REF=dataset.name

Parameter Components

SER (Volume Serial Number)

  • Specifies the volume serial number(s) of the volume(s) containing the data set
  • For a single volume: VOLUME=SER=volser
  • For multiple volumes: VOLUME=SER=(vol1,vol2,vol3,...)
  • Volume serial numbers are 1-6 alphanumeric or national ($,#,@) characters
  • Example: VOLUME=SER=SYS001 or VOL=SER=(TAPE01,TAPE02,TAPE03)

PRIVATE

  • Requests that the volume remain mounted until all data sets on the volume are closed
  • Prevents the volume from being shared with other jobs
  • Example: VOLUME=(PRIVATE,SER=USER01)

RETAIN

  • Requests that the volume remain mounted after the data set is closed
  • Useful when the volume will be needed again in the same job
  • Example: VOLUME=(PRIVATE,RETAIN,SER=WORK01)

Sequence Number (seq)

  • Indicates the relative position of the data set on a tape volume
  • Used for tape data sets only
  • Default value is 1 (indicating the first data set on the tape)
  • Example: VOLUME=(,,,2,SER=TAPE01) - specifies the second data set on TAPE01

Volume Count (volcount)

  • Specifies the maximum number of volumes that a data set might need
  • Used when the exact number of volumes needed isn't known
  • Default is the number of volume serials specified
  • Example: VOLUME=(,,,5,SER=(VOL001,VOL002)) - allows up to 5 volumes starting with VOL001 and VOL002

REF (Reference)

  • References the volume(s) of an existing data set
  • Ensures that a data set is created on the same volume as another data set
  • Can reference a DD statement in the same or previous step: VOLUME=REF=*.STEP1.DDNAME
  • Can reference a cataloged data set: VOLUME=REF=CATALOG.DATA.SET
  • Example: VOLUME=REF=*.STEP1.INPUT

Common Usage Scenarios

Specific Volume Allocation

jcl
1
2
//SPECDD DD DSN=USER.SPECIFIC.DATA,DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA,SPACE=(CYL,(10,5)),VOL=SER=USR001

Creates a new data set on the volume with serial number USR001

Multi-Volume Data Set

jcl
1
2
3
//MULTDD DD DSN=USER.LARGE.DATA,DISP=(NEW,CATLG,DELETE), // UNIT=(SYSDA,3),SPACE=(CYL,(50,10)), // VOL=SER=(VOL001,VOL002,VOL003)

Creates a data set that spans three volumes: VOL001, VOL002, and VOL003

Volume Reference

jcl
1
2
3
4
//STEP1 EXEC PGM=IEFBR14 //INPUT DD DSN=USER.INPUT.DATA,DISP=SHR //OUTPUT DD DSN=USER.OUTPUT.DATA,DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA,SPACE=(CYL,(10,5)),VOL=REF=*.INPUT

Creates a new data set on the same volume as USER.INPUT.DATA

Cataloged Data Set Reference

jcl
1
2
//REFDD DD DSN=USER.NEW.DATA,DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA,SPACE=(TRK,(50,10)),VOL=REF=USER.CATALOG.DATA

Creates a new data set on the same volume as the cataloged data set USER.CATALOG.DATA

Tape Data Set with Sequence

jcl
1
2
//TAPESEQ DD DSN=USER.TAPE.FILE3,DISP=OLD, // UNIT=TAPE,VOL=(,,,3,SER=TAPE01)

Accesses the third data set on tape volume TAPE01

Private Volume Retention

jcl
1
2
3
//RETDD DD DSN=USER.IMPORTANT.DATA,DISP=(NEW,KEEP,DELETE), // UNIT=SYSDA,SPACE=(CYL,(5,1)), // VOL=(PRIVATE,RETAIN,SER=WORK02)

Creates a data set on a private volume that will remain mounted after the data set is closed

Volume Count for Expansion

jcl
1
2
3
//GROWDD DD DSN=USER.EXPANDING.DATA,DISP=(NEW,CATLG,DELETE), // UNIT=(SYSDA,5),SPACE=(CYL,(100,50)), // VOL=(,,,5,SER=DATA01)

Creates a data set that begins on DATA01 but can expand to use up to 5 volumes if needed

Volume Selection Process

  1. Explicit VOL=SER: The system uses exactly the volume(s) specified
  2. VOL=REF: The system uses the same volume(s) as the referenced data set
  3. No VOLUME parameter, DISP=OLD/SHR: The system obtains volume information from the catalog
  4. No VOLUME parameter, DISP=NEW: The system selects an appropriate volume based on the UNIT specification
  5. SMS-managed storage: SMS may override explicit volume specifications based on storage class requirements

Best Practices

  1. Use catalog facilities rather than explicit VOL=SER whenever possible for better flexibility
  2. Use VOL=REF to ensure related data sets are on the same volume for better performance
  3. Specify appropriate volume count for data sets that may need to expand beyond initial volumes
  4. Be cautious with RETAIN attribute as it can lead to volume contention
  5. Consider SMS storage management as an alternative to explicit volume specification
  6. Document volume usage in your organization to prevent conflicts

Restrictions and Considerations

  • SMS-managed data sets: VOLUME parameters may be ignored by SMS
  • DASD vs. tape: Some VOLUME subparameters (like sequence) are only meaningful for tape
  • Volume limit: Up to 255 volumes can be specified for a data set
  • GDG considerations: Special handling may be needed for Generation Data Groups
  • Security: Access to specific volumes may be restricted by security software

Related Concepts