The HSMS statement SELECT-FILE-NAMES creates a list of path names that can be used in the subsequent operands to select BS2000 files:
FILE-NAMES/SELECT-FILES=*SELECTED
Unless otherwise specified, this list is written to a temporary file that is deleted once the task has been concluded.
Alternatively, this list can be written to a cataloged file, which can then be specified as a list file:
FILE-NAMES/SELECT-FILES=*FROM-FILE(LIST-FILE-NAME=<filename>)
When handled in this way, the generated list can be used not just once, during a single HSMS session, but as often as desired.
SELECT-FILE-NAMES can be used to select files:
from the catalog of a pubset in preparation for backup, archiving or migration or when exporting files
from an archive directory when restoring or recalling files or from a directory when importing files.
In addition to the FILE-NAMES operand, a whole range of selection criteria can be used to select files in a catalog or archive directory.
Selection from a catalog
Files from a pubset catalog are selected by means of the SELECT-FROM= *CATALOG operand. The following selection criteria apply:
the volume on which they reside
the storage type (*PUBLIC-SPACE or *NET-STORAGE)
the file type of Net-Storage files (*BS2000 or *NODE-FILE)
the storage level at which they are managed
the period of time since the last file access
the file size
the backup class.
Selection from an archive
Files can be selected from an archive by means of the operand SELECT-FROM= *ARCHIVE. The following selection criteria apply:
the archive in which they are managed
the save version in which they have been saved
the file expiration date
their save type.
SELECT-FILE-NAMES can also be used to select files in a dialog.