LISTDSN


The LISTDSN command lists the archives, backup copies, imported data sets, and Cloud Data Sets (CDSs) of a specified data set or data sets.

Logic

The command lists all the relevant data set types:

  • Backup copies created directly by a backup policy
  • Copies of the data set that were found on a volume full dump
  • Archive copy of the data set
  • Imported data sets
  • CDSs

When the command lists a pattern of data sets, the copies per each data set are displayed separately, from the most current copy to the oldest, regardless of its type.

ENTRY and UNIQUEID are displayed to reference a specific copy in subsequent commands.

Syntax

M9CLI LISTDSN <dataSetNamePattern>
 [VOLume(<volumePattern>)]
 [DATE(yyyy/mm/dd) | DATERange(yyyy/mm/dd-yyyy/mm/dd)]
 [ENTry(<integer> | UNIQueid(<uniqueId>)]
 [FIELDS(DEFAULT|ALL)]
 [OUTPUT(TABLE|LIST)]
 [NODUMP]

Required parameters

Parameter

Description

dataSetNamePattern

A data set or a group of data sets

You can also specify a pattern by using %, *, or **. For example, SYS2.PROC*, or SYS%.PROC*.

You can enclose the pattern or data set name in apostrophes. For more information about how to specify a pattern, see Specifying-the-data-set-or-volume-for-the-CLI-command.

Optional parameters

Option (short option)

Description

Format

Examples

VOLume

The volume on which the data set resides

Full name or a pattern

SYSRES

PROD*

SYS%RS

DATE

Requests backup copies or archives that were created on a specific date only

DATE and DATERange are mutually exclusive.

yyyy/mm/dd

2019/08/15

DATERange

Requests backup copies or archives that were created on a specific date range

DATERange and DATE are mutually exclusive.

yyyy/mm/dd-yyyy/mm/dd

2019/01/01-2019/08/15

ENTry

A positive sequential number from 0, 1, 2, and so on, representing the available entries of a backup copy, according to the specified criteria

The entries are relative to the selection used in the LISTDSN command.

integer

0—For the latest copy (default)

1—For the copy before the latest, and so on.

UNIQueid

An 8-character ID that, when combined with the data set name, identifies each backup copy

Using UNIQueid, you can refer to a specific copy of a data set in other commands (for example, RESTDSN) without having to specify any additional filters.

UNIQueid and ENTRY are mutually exclusive.

8 characters

You can take the UNIQueid from a previous LISTDSN command’s output and use it in subsequent commands, such as RESTDSN.

FIELDS

Specifies the fields to print in the output.

Valid values are DEFAULT and ALL. The default is DEFAULT.

Important

When you specify FIELDS(ALL), you must specify OUTPUT(LIST).

Specifying DEFAULT prints the following fields:

  • ENTRY
  • DATE
  • TIME
  • VOLUME
  • TYPE
  • COMMAND
  • CATALOGED
  • WARNING
  • EXPIRATION|EFFECTIVE_EXPIRATION
  • UNIQUEID

Specifying ALL prints the fields in DEFAULT, in addition to the following fields:

  • ARCHIVE_TIMESTAMP
  • BACKUP_TIMESTAMP
  • USER_SPECIFIED_EXPIRATION_DATE
  • CATALOG_CREATION_DATE
  • CATALOG_EXPIRATION_DATE
  • LABEL_CREATION_DATE
  • LABEL_EXPIRATION_DATE
  • VTOC_CREATION_DATE 
  • VTOC_EXPIRATION_DATE
  • CLOUD_SIZE
  • IS_SMS_MANAGED
  • MC_NAME
  • SYSPLEX
  • SYSTEM
  • RECORD_FORMAT
  • DSORG

For more information about the output fields, see Output.

NA

NA

OUTPUT

Specifies the output format

Valid values are TABLE and LIST. The default is TABLE.

Important

When you specify FIELDS(ALL), you must specify OUTPUT(LIST).

NA

NA

NODUMP

Requests LISTDSN to display backup copies only, without data set copies found in volume full dumps

The default behavior is to allow selection of backups from a volume full dump.

NA

NA

Output

The LISTDSN output displays the given LISTDSN command and parameters, followed by the requested information. For every filtered data set, the following headline is displayed:

Listing Data Set <dataSetName>

The headline is followed by a list of the available backup copies, archives, and imports. For each record on the list, the following details are displayed:

Field

Description

Format

ENTRY

Integer representing the sequence of the displayed list

The entries are relative to the filter used in the LISTDSN command. When you list a pattern, the ENTRY is displayed per data set.

0,1,2,...—A backup copy or a copy from full dump, available for restore

- —An archive or an import copy, not available for restore

DATE

Date of creation

yyyy/mm/dd

TIME

Local time when created

hh:mm:ss

VOLUME

Volume on which the data set resides

vvvvvv

TYPE

How the resource entry was created 

Archive—Archived data set

Backup—Backup copy

Full Dump—Backup copy from a volume's full dump

Cloud DS—Cloud data sets that originated from a JCL or an import policy 

COMMAND

Whether the version originated from a CLI command

Y—Originated from CLI

N—Not originated from CLI

CATALOGED

Whether the data set was cataloged during backup

Y—Yes

N—Not cataloged

- —When you list a data set copy from a volume full dump, no catalog information is available

WARNING

Whether the copy or archive creation ended with warnings (DFDSS RC=4)

The warnings have different causes, depending on DFDSS execution.

Y—Yes
The copy or archive creation ended with RC=4. For DFDSS details, see the backup log in the UI.

N—No

EXPIRATION|EFFECTIVE_EXPIRATION

Current expiration date of the backup, archive, or import

The EFFECTIVE_EXPIRATION field displays only when you specify OUTPUT (LIST).

yyyy/mm/dd

NONE—The expiration date was not specified by either the catalog, VTOC, or SMS.

N/A—The expiration date is not applicable for this type.

UNIQUEID

An alphanumeric ID to uniquely identify the backup copy or archive

uniqueId

ARCHIVE_TIMESTAMP

Archive creation time stamp

yyyy-mm-dd_hhmmss.microseconds

BACKUP_TIMESTAMP

Backup creation time stamp

yyyy-mm-dd_hhmmss.microseconds

USER_SPECIFIED_EXPIRATION_DATE

User-specified expiration date

yyyy/mm/dd 

CATALOG_CREATION_DATE

Catalog creation date

yyyy/mm/dd 

CATALOG_EXPIRATION DATE

Catalog expiration date

yyyy/mm/dd 

LABEL_CREATION_DATE

Label creation date

This field is available only for import and CDS.

yyyy/mm/dd 

LABEL EXPIRATION DATE

Label expiration date

This field is available only for import and CDS.

yyyy/mm/dd 

VTOC_CREATION_DATE

VTOC creation date

This field is available only for backup and archive.

yyyy/mm/dd 

VTOC_EXPIRATION DATE

VTOC expiration date

This field is available only for backup and archive.

yyyy/mm/dd 

CLOUD_SIZE

Size of the resource in bytes

cloudSize

IS_SMS_MANAGED

Whether the resource is SMS managed

Y—The resource is SMS managed

N—The resource is not SMS managed

MC_NAME

The SMS management class name

This field is available only if the resource is SMS-managed.

mcName

SYSPLEX

Sysplex name of the data set origin

sysplexName

SYSTEM

System name of the data set origin

systemName

RECORD_FORMAT

Data set record format

recordFormat

DSORG

Data set organization

dataSetOrganization

Examples

The following examples demonstrate use of the command:

Listing all instances of a data set on a certain day

Example:

Backup copies exist for two different data sets with the same name. One is cataloged on the volume M9USER, and the other is not cataloged and resides on volume N0QS01. On the specified day, the backup was performed twice on both data sets. One of the backup copies ended with a warning and appears as W=Y.

M9CLI LISTDSN M9.MVS.JOBS DATE(2019/06/15)

LISTDSN M9.MVS.JOBS DATE(2019/06/15)
Mode19 CLI SYSNAME: S0W1 DATE: 2019/07/27 VERSION:

Listing Data Set: M9.MVS. JOBS
  ENTRYDATE   TIME    VOLUME TYPE    CMD C W EXPIRATION UNIQUEID
  ----- ---------- -------- ------ -------- --- - - ---------- --------
      02019/06/15 11:47:11N0QS01 Backup N  - N NONE       DK40DFJE
      12019/06/15 11:44:27M9USER Backup N  Y N NONE   DN3D30SP
      22019/06/15 09:40:02N0QS01 Backup N  - Y NONE   194JD5K3
      32019/06/15 09:39:33M9USER Backup N  Y N NONE   N4R097JM

Listing all instances of a data set using a pattern

Example:

Two data sets were selected by the specified pattern. The first one is the same as the one displayed in the previous example. The second one has three backup copies, from a cataloged data set on disk M9USER.

M9CLI LISTDSN M% .MVS**

LISTDSN M% .MVS**
Mode19 CLI SYSNAME: SOWl DATE: 2019/07/27 VERSION:

Listing Data Set: M9.MVS. JOBS

  ENTRYDATE   TIME    VOLUME TYPE    CMD C W EXPIRATION UNIQUEID
  ----- ---------- -------- ------ -------- --- - - ---------- --------
      02019/06/15 11:47:11N0QS01 Backup N  - N NONE       DK40DFJE
      12019/06/15 11:44:27M9USER Backup N  Y N NONE   DN3D30SP
      22019/06/15 09:40:02N0QS01 Backup N  - Y NONE   194JD5R3
      32019/06/15 09:39:33M9USER Backup N  Y N NONE   N4R097JM
      42019/06/20 09:30:55N0QS01 Backup N  - N NONE   2MDOCMA9
      52019/06/20 09:25:17M9USER Backup   N  Y N NONE   5BGID390

ListingData Set: M9 .MVS . DBA. JOBS

  ENTRYDATE   TIME    VOLUME TYPE    CMD C W EXPIRATION UNIQUEID
  ----- ---------- -------- ------ -------- --- - - ---------- --------
      02019/06/25 09:48:34M9USER Backup N  Y N NONE   3E3KFDSP
      12019/06/26 09:45:21M9USER Backup Y  Y N NONE   203NFKS3
      22019/06/27 09:50:52M9USER Backup N  Y N NONE      12M3KS09

Listing all instances of a data set on a certain volume

Example:

The display is the same as shown in the previous example, except that the displayed backup copies are copies of the data set that resides on volume NOQS01.

M9CLI LISTDSN M9.MVS.JOBS VOL(NOQSOl)

LISTDSN M9.MVS.JOBS VOL(NOQSOl)
Mode19 CLI SYSNAME: SOWl DATE: 2019/07/27 VERSION:

Listing Data Set: M9.MVS.JOBS

  ENTRYDATE   TIME    VOLUME TYPE    CMDC WEXPIRATION UNIQUEID
  ----- ---------- -------- ------ -------- --- - - ---------- --------
      02019/06/15 11:47:11N0QS01 Backup N- NNONE   DK40DFJE
      12019/06/15 09:40:02N0QS01 Backup N- YNONE   194JD5K3
      22019/06/20 09:30:55N0QS01 Backup N- NNONE   2MD0CMA9

Listing a data set pattern from a specific set of disks

Example:
M9CLI LISTDSN M9.**.JOBS VOL(NOQS*)

LISTDSN M9.**.JOBS VOL(N0QS*)
Mode19 CLI SYSNAME: SOWl DATE: 2019/07/27 VERSION:

Listing Data Set: M9.MVS.JOBS

  ENTRY DATE   TIME    VOLUME TYPE    CMD C W EXPIRATION UNIQUEID
  ----- ---------- -------- ------ -------- --- - - ---------- --------
      0 2019/06/15 11:47:11 N0QS01Backup N- N NONE       DR40DFJE
      1 2019/06/15 09:40:02 N0QS01Backup N- Y NONE       194JD5K3

Listing all instances of data sets starting with M9.*, created within a date range

Example:
M9CLI LISTDSN M9.MVS.DBA.CNTL DATERANGE(2019/06/26-2019/06/30)

Listing Data Set: M9 .MVS . DBA. CNTL

  ENTRY DATE   TIME    VOLUME TYPE    CMD C W EXPIRATION UNIQUEID
 ----- ---------- -------- ------ -------- --- - - ---------- --------
     02019/06/30 07:47:03N0QS01 Backup N- NNONE   DK40DFJE
     12019/06/29 07:44:27M9USER Backup NY NNONE   DN3D30SP
     22019/06/28 07:49:02N0QS01 Backup N- YNONE   194JD5K3
     32019/06/27 07:39:30M9USER Backup NY NNONE   N4R097JM
     42019/06/26 07:50:35N0QS01 Backup N- NNONE   2MDOCMA9

Listing all instances of data sets starting with m9.*, with the OUTPUT(LIST) and FIELDS(ALL) parameters

Example:
Model9 CLI SYSNAME: M9L1   DATE: 2024/03/14             VERSION: 3.1.0
                                                                              
Listing Data Set: M9.M9TSTJ.ALTER.KSDS                                         
                                                                              
ENTRY                           : -                                            
DATE                            : 2024/03/11                                   
TIME                            : 21:23:09                                     
VOLUME                          : N0QS01                                       
TYPE                            : Full Dump                                    
COMMAND                         : N                                            
CATALOGED                       : -                                            
WARNING                         : N                                            
EFFECTIVE EXPIRATION            : N/A                                          
UNIQUEID                        : 359acd199c964f8d984a6d9e03a37c3b             
BACKUP TIMESTAMP                : N/A                                          
USER SPECIFIED EXPIRATION DATE  : N/A                                          
CLOUD SIZE                      : 19275180                                     
IS SMS MANAGED                  : false                                        
SYSPLEX                         : LOCAL                                        
SYSTEM                          : M9L1                                         
RECORD FORMAT                   : N/A                                          
DSORG                           : N/A                                          
                                                                              
Listing Data Set: M9.M9TSTJ.NONE.KSDS                                          
                                                                              
ENTRY                           : -                                            
DATE                            : 2024/03/11                                   
TIME                            : 21:23:09                                     
VOLUME                          : N0QS01                                       
TYPE                            : Full Dump                                    
COMMAND                         : N                                            
CATALOGED                       : -                                            
WARNING                         : N                                            
EFFECTIVE EXPIRATION            : N/A                                          
UNIQUEID                        : 359acd199c964f8d984a6d9e03a37c3b             
BACKUP TIMESTAMP                : N/A                                          
USER SPECIFIED EXPIRATION DATE  : N/A                                          
CLOUD SIZE                      : 19275180                                     
IS SMS MANAGED                  : false       

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*