In HCR77D2 (V2R5), we shipped a sample CSFMKVPR which does exactly what you are asking for.
Notes:
1. Please make sure to keep a backup of the KDS before the operation for safe keeping.
2. The sample works on sequential files (IDCAMS REPRO of the CKDS or PKDS) to avoid manipulating a VSAM file directly.
3. The sample will refuse to remove an MKVP if there are any tokens that depend on that master key present. We will list the key labels which prevent the operation in the job output.
------------------------------
Eric Rossman
------------------------------