11.01.2013 Views

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Note: When you delete a data set, the BCS, VVDS, and VTOC entries for the data set are<br />

removed. If you later recover a BCS, there can be BCS entries for data sets which have<br />

been deleted. In this case, the data sets do not exist, and there are no entries for them in<br />

the VVDS or VTOC. To clean up the BCS, delete the BCS entries.<br />

Delete aliases<br />

To simply delete an alias, use the IDCAMS DELETE ALIAS command, specifying the alias you<br />

are deleting. To delete all the aliases for a catalog, use EXPORT DISCONNECT to disconnect the<br />

catalog. The aliases are deleted when the catalog is disconnected. When you again connect<br />

the catalog (using IMPORT CONNECT), the aliases remain deleted.<br />

Delete the catalog entry<br />

To only delete a catalog entry, you can use the DELETE N<strong>OS</strong>CRATCH command; the VVDS and<br />

VTOC entries are not deleted. The entry deleted can be reinstated with the DEFINE<br />

RECATALOG command, as shown in Figure 6-19.<br />

//DELDS JOB ...<br />

//STEP1 EXEC PGM=IDCAMS<br />

//SYSPRINT DD SYSOUT=A<br />

//SYSIN DD *<br />

DELETE TEST1.A N<strong>OS</strong>CRATCH /* deletes TEST1.A from the BCS */<br />

DEFINE NONVSAM - /* redefines TEST1.A into the BCS */<br />

(NAME(TEST1.A) -<br />

DEVICETYPE(3390)-<br />

VOLUMES(VSF6S3) -<br />

RECATALOG -<br />

)<br />

/*<br />

Figure 6-19 Delete N<strong>OS</strong>CRATCH, define RECATALOG<br />

Delete VVR or NVR records<br />

When the catalog entry is missing, and the data set remains on the DASD, you can use the<br />

DELETE VVR for VSAM data sets and DELETE NVR for non-VSAM SMS-managed data sets to<br />

remove its entry from the VVDS. You can only use these commands if there is no entry in the<br />

BCS for the data set.<br />

//DELDS JOB ...<br />

//S1 EXEC PGM=IDCAMS<br />

//SYSPRINT DD SYSOUT=*<br />

//DD1 DD VOL=SER=VSF6S3,UNIT=3390,DISP=OLD<br />

//SYSIN DD *<br />

DELETE TEST1.A -<br />

FILE(DD1) -<br />

NVR<br />

/*<br />

Figure 6-20 Delete the VVDS entry for a non-VSAM data set<br />

Important: When deleting VSAM KSDS, you must issue a DELETE VVR for each <strong>of</strong> the<br />

components, the DATA, and the INDEX.<br />

348 <strong>ABCs</strong> <strong>of</strong> z/<strong>OS</strong> <strong>System</strong> <strong>Programming</strong> <strong>Volume</strong> 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!