Joined: 14 Mar 2007 Posts: 8704 Location: Back in jolly old England
I have done something similar in the past, all of it based on the output of ISRSUPC compare.
From the output you can find - from the summary data at the end of the report.
a) which members have changed, or now exist in the new PDS but not the old.
b) which members no longer exist in the new PDS but remain in the old PDS.
Using DFSORT you can generate IEBCOPY SELECT statements, or IDCAMS DELETE statements as required.
If I recall correctly you only need include the lines which start **.
Then check each output dataset generated by DFSORT for valid data and conditionally execute the IEBCOPY or IDCAMS steps.