Checking LISTD for empty data sets.
search cancel

Checking LISTD for empty data sets.

book

Article ID: 239170

calendar_today

Updated On:

Products

DISK BACKUP AND RESTORE Disk Backup and Restore - MVS

Issue/Introduction

How to check if a data set is empty using the LISTD command?

Environment

Component : Disk Backup and Restore

Resolution

Refer the DISK documentation for Subfile Record Format - (DSNINDEX) for more information

DSNFLAG6 DS    X        +93    FLAG BYTE 6
DSNP2    EQU   X'80'           ..PRIMARY2 DSNINDEX
DSNRENMD EQU   X'40'           ..DSNINDEX RENAMED
DSNFAST  EQU   X'20'           ..FAST ARCHIVE
DSNNEWNM EUQ   X'10'           ..ARCHIVE with NEWNAME or NEWHLQ
DNSEMPTY EQU   X'08'           ..EMPTY DATA SET

the last position of FLAG6 field contains the information if the data set is empty. This field can be included in the LISTD command output, specifying FIELD FLAG6 (even if the LISTD explanation doesn't report it). All the data sets with FLAG6 ending with an 8, are empty.