Examples of how to code commonly used list requests

The examples as presented below show how to use the LIST command to request various types of commonly desired information. Using the LIST command contains examples of output produced by the LIST command.

Note: Any values specified here are only examples and should not be interpreted as the values to be used for your system.

Listing migrated data sets contained in the SDSP

In this example, you issued the DATASETNAME command to list the migrated data sets contained in the SDSP data set on a particular migration level 1 (ML1) volume and the results of the request are written to an output data set.
   LIST DATASETNAME MIGRATIONCONTROLDATASET SELECT(VOLUME(L1VOLA) SDSP)
   OUTDATASET(fully.qualified.dsn)

Listing migrated data sets using abbreviations

In this example, you used the standard abbreviations to list the migrated data sets.
   LIST DSN MCDS SEL(VOL(L1VOLA) SDSP)

Listing the number and total space of migrated data sets

This example shows you how to list the number and total space of the migrated data sets contained in the SDSP data set on a particular ML1 volume.
   LIST DATASETNAME MIGRATIONCONTROLDATASET SELECT(VOLUME(L1VOLA) SDSP) SUMMARY

Listing migrated data sets not referenced in 180 days

This example shows you how to list the migrated data sets, not referenced in 180 days, on an ML1 volume and how to write the results of the request to the terminal.
   LIST DSN MCDS SEL(VOL(L1VOLA) AGE(180)) TERM

Listing migrated data sets with a high-level qualifier

This example shows you how to list on ML1 volumes the migrated data sets having a common high-level qualifier that have not been referenced in 180 days.
   LIST LEVEL(L364204) MCDS SELECT(ML1 AGE(180))

Listing specific migrated data sets

This example shows you how to request a specific ML1 volume and how to write the results of the request to the terminal.
   LIST LEVEL(L364204) MCDS SELECT(VOLUME(L1VOLB) AGE(180)) TERM

Listing migrated data sets with a high-level and a common secondary qualifier

This example shows you how to list on ML1 volume the migrated data sets with a common high-level qualifier and a common secondary qualifier and how to write the results of the request to the terminal.
   LIST LEVEL(L364204.TEST) MCDS SELECT(VOLUME(L1VOLB)) TERM

Listing copy pool information for all copy pools

In this example, DFSMShsm lists information for all copy pools..
   LIST COPYPOOL
 

See Figure 1 for an example of the output.

Listing copy pool information for a specific copy pool

In this example, DFSMShsm lists detailed information for each backup version of the CPDATABASE1 copy pool.
   LIST COPYPOOL(CPDATABASE1) 

See Figure 2 for an example of the output.

Listing specified copy pool storage group information

In this example, DFSMShsm lists information for each volume in the CPBSGDATABASE4 storage group and the corresponding source volume for each volume in that copy pool backup storage group. This list only returns those volumes that DFSMShsm has selected as target volumes. For those target volumes that are listed, the source volume is also listed.
   LIST COPYPOOLBACKUPSTORAGEGROUP(CPBSGDATABASE4)
 

See Figure 1 for an example of the output.

Listing information about data sets backed up as part of a copy pool backup version

In this example, DFSMShsm lists all data sets backed up as part of a copy pool backup version, including those that have been deleted. The data sets are listed in alphabetical order by catalog.
   LIST COPYPOOL(CP1) DATASETS(GENERATION(1))
Note: DATASETS only returns information related to a copy pool backup version if the catalog information for a given backup version is captured at the time of backup.

See Figure 1 for an example of the output.

Listing summary information from the MCDS

This example shows you how to list summary information from the MCDS and write the results to an output data set.
   LIST DSN SUMMARY ODS(LIST)

See Figure 3 for an example of the output.

Listing specified volume information

This example shows you how to list only the volume information for the specific volume specified by the volser and how to write the results of the request to the terminal.
   LIST TTOC(A00800) NODATASETINFORMATION TERM

See Figure 2 for an example of the output.

Listing specified volume and data-set-related information

This example shows you how to list the volume information for the specified volume volser and the data-set-related information (the default of DATASETINFORMATION will be used) and how to write the results of the request to an output data set.
   LIST TTOC(BATP01) OUTPUTDATASET(LIST)

See Figure 3 for an example of the output.

Listing volume information for failed RECYCLE ML2

This example shows you how to list the volume information for the migration level 2 volumes that have previously failed RECYCLE and how to write the results of the request to an output data set.
   LIST TTOC SELECT(ML2 FAILEDRECYCLE) ODS(LIST)

See Figure 7 for an example of the output.

Listing tape volumes with incomplete data set information

This example shows you how to list all the tape volumes that have incomplete data set information saved in the OCDS TTOC record.
   LIST TTOC SELECT(FAILEDCREATE)

See Figure 8 for an example of the output.

Listing volume information for data sets spanning four or more volumes

This example shows how to list the volume information for the ML2 and backup volumes that contain data sets that span four or more volumes and how to write the results of the request to an output data set.
   LIST TTOC SELECT(BOTH EXCESSIVEVOLUMES) ODS(LIST)

See Figure 9 for an example of the output.

Listing information for connected volumes

This example shows all volumes that are connected to this volume and whether or not these volumes are in the library.
   LIST TTOC SELECT(CONNECTED(A00800)) ODS(LIST)

See Figure 1 for an example of the output.

Listing volume information about disaster alternate volumes

This example shows how to list the volume information about disaster alternate volumes.
   LIST TTOC SELECT (LIBRARY DISASTERALTERNATEVOLUMES) ODS(LIST)

See Figure 6 for an example of the output.

Listing volume information about alternate tape volumes

This example shows you how to list the volume information for the migration level 2 and backup volumes that do not have an ALTERNATE tape volume and are in a tape library. The result is printed to an output data set.
   LIST TTOC SELECT (LIBRARY NOALTERNATEVOLUME) ODS(LIST)

See Figure 5 for an example of the output.

Listing information about available tape volumes

This example shows you how to list tape volumes that are available for selection (not marked full) and thus identify the empty and partially full backup and migration tape volumes. The results go to the SYSOUT class.
   LIST TTOC SELECT(NOTFULL) SYSOUT(H)

Listing information about partially filled ML2 tape volumes not associated for output by any migration or recycle task

This example shows you how to list all partially filled ML2 tapes that are not currently associated with an ML2 output task in any host. The results of the request are written to an output data set.
   LIST TTOC SELECT(NOTASSOCIATED) ODS('JCA.ASSOCNOT.D041798')

See Figure 10 for an example of the output.

Listing information about contents of the dump volume

This example shows you how to list all data sets that have been dumped to a specified dump volume.
   LIST DUMPVOLUME(A00359) DUMPCONTENTS(PRIM02) ODS(List)

See Figure 1 for an example of the output.

Listing information about a dump volume

This example shows how to list all data sets that have been dumped to a volume with a specified volser. The output includes the dump copy data set name.
   LIST DUMPVOLUME(A00359) ODS(LIST)

See Figure 1 for an example of the output.

Listing information about a specific dump class profile

This example shows how to list all data sets that have been dumped to a specific DUMPCLASS.
   LIST DUMPCLASS(WEEKLY) ODS(LIST)

See Figure 1 for an example of the output.

Listing information about aggregate data sets

This example shows how to list the aggregate version record (ABR record) Version 2 to the terminal.
   LIST AGGREGATE(PAY1) VERSION(0002) TERM

See Figure 1 for an example of the output.

Listing information about aggregate data sets and saving the output to the ODS

This example shows how to list the aggregate version record (ABR record) Version 1 to the ODS.
   LIST AGGREGATE(PAY1) VERSION(0001) ODS(LIST)

See Figure 2 for an example of the output.

Listing ML2 volumes taken away by recall or ABACKUP

This example shows how to list the ML2 volumes that were taken away from an output function because RECALL or ABACKUP functions need a data set on the volume.
   LIST TTOC SELECT(RECALLTAKEAWAY)

Listing tape volumes that can use available tape capacity

This example shows how to list all tape volumes that are written by an IBM® 3590 that is emulating an IBM 3490 in CAPACITYMODE(EXTENDED).
   LIST TTOC SELECT(CAPACITYMODE(EXTENDED))

Listing tape volumes capable of being resumed after AUDIT MEDIACONTROLS was interrupted

This example shows how to list all tape volumes that were interrupted during AUDIT MEDIACONTROLS and are capable of being resumed.
   LIST TTOC SELECT(RESUMEAUDIT)