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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Delete generation data groups<br />

In this example, a generation data group (GDG) base catalog entry is deleted from the<br />

catalog. The generation data sets associated with GDGBASE remain unaffected in the<br />

VTOC, as shown in Figure 6-21.<br />

//DELGDG JOB ...<br />

//S1 EXEC PGM=IDCAMS<br />

//SYSPRINT DD SYSOUT=*<br />

//SYSIN DD *<br />

DELETE TEST1.GDG -<br />

GENERATIONDATAGROUP -<br />

RECOVERY<br />

/*<br />

Figure 6-21 Delete a GDG base for recovery<br />

The DELETE command with keyword RECOVERY removes the GDG base catalog entry from the<br />

catalog.<br />

Delete an ICF<br />

When deleting an ICF, take care to specify whether you want to delete only the catalog, or if<br />

you want to delete all associated data. The following examples show how to delete a catalog.<br />

► Delete with recovery<br />

In Figure 6-22, a user catalog is deleted in preparation for replacing it with an imported<br />

backup copy. The VVDS and VTOC entries for objects defined in the catalog are not<br />

deleted and the data sets are not scratched, as shown in the JCL.<br />

//DELET13 JOB ...<br />

//STEP1 EXEC PGM=IDCAMS<br />

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

//SYSPRINT DD SYSOUT=A<br />

//SYSIN DD *<br />

DELETE -<br />

USER.CATALOG -<br />

FILE(DD1) -<br />

RECOVERY -<br />

USERCATALOG<br />

/*<br />

Figure 6-22 Delete a user catalog for recovery<br />

RECOVERY specifies that only the catalog data set is deleted, without deleting the objects<br />

defined in the catalog.<br />

► Delete an empty user catalog<br />

In Figure 6-23 on page 350, a user catalog is deleted. A user catalog can be deleted when<br />

it is empty; that is, when there are no objects cataloged in it other than the catalog's<br />

volume. If the catalog is not empty, it cannot be deleted unless the FORCE parameter is<br />

specified.<br />

Chapter 6. Catalogs 349

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

Saved successfully!

Ooh no, something went wrong!