1. More than 1000 records in a dataset (PS), each record is VSAM file name. like this:
*******************************************************
SERS.MSI.FTRSF.TEST1
SERS.MSI.FTRSF.TEST2
SERS.MSI.FTRSF.TEST3
SERS.MSI.FTRSF.TEST4
SERS.MSI.FTRSF.TEST5
SERS.MSI.FTRSF.TEST6
........ .......
SERS.MSI.FTRSF.T1000
*******************************************************
2. I want to know whether these files exist in system. And print the files name which are not in system in dataset 'SERS.MSI.OUTPUT'.

Hi, Here you are providing the Syntax to check individual one by using the LISTCAT parameter. But as per David's note Suppose if we want to check only that PS file(all of the VSAM files exists in that file), and from there it should check all of those VSAM files. For that how to verify it? Please provide sample Syntax also.

My suggestion was to take the complete list of datasets, format a LISTCAT command using each dataset, and finally run an IDCAMS and write the SYSPRINT results to a dataset.

If you are looking for a single LISTCAT command for listing all datasets that match a specific pattern, you could use:

Code:

LISTCAT LEVEL('SERS.MSI')

This command will not list missing datasets, only existing ones. If you took the list of existing datasets and placed them sequentially in a dataset starting in position 1. Then take the list of datasets from your original dataset and place them sequentially in a dataset starting in position one.

You could then sort them all together using ICETOOL or SYNCTOOL using the NODUPS option and the output file would be every dataset that didn't match the datasets on your original file.