When you have defined a dataset in the wrong catalog – in this case a master catalog – and you want to correct this you can use this technique.The DELETE NOSCRATCH option assures only the catalog entry is deleted. If you would omit this, the entire dataset would be deleted, so be cautious.
//DEFCAT EXEC PGM=IDCAMS //STEPCAT DD DISP=SHR,DSN=SYS1.MSTRCTLG //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE (SYS1.DATASET) NVSAM NOSCRATCH CAT(SYS1.MSTRCTLG) DEFINE NVSAM (NAME(SYS1.DATASET) DEVT(3390) VOL(VOL123)) - CAT(SYS1.MSTRCTLG)
//Pierre G