2009年8月11日 星期二

Notes on deleting orphaned VSAM components

If the data or index component of a VSAM cluster become permanently disassociated with a catalog entry one of the options available is to fool the VTOC into thinking the components are "regular" datasets so that they can be deleted or renamed.
(It may well be preferable to try by other means to get the components re-cataloged officially.)
Is the dataset in use?
D GRS,RES=(SYSDSN,TSTB.TRAN.FILE0)
Firstly we need to find the CCHHR address on the disk for each component (Note the use of 3380 or 3390 as the unit name.)
//STEP1 EXEC PGM=IEHLIST
//SYSPRINT DD SYSOUT=*
//DD1 DD UNIT=3380,VOL=SER=LRIP90,DISP=SHR
//SYSIN DD *
LISTVTOC DUMP,VOL=3380=LRIP90,DSNAME=(TSTB.TRAN.FILE0.DATA)
LISTVTOC DUMP,VOL=3380=LRIP90,DSNAME=(TSTB.TRAN.FILE1.DATA)
/*
At the bottom right of each entry is the CCHHR address e.g. 0000000104. Use this in the zap job below. The plan is to fool the system into thinking this is not a VSAM dataset.

(See DFSMSdfp Advanced Services manual (or equivalent) for details of the bit settings in the DSCBs.)
//PATCH1 EXEC PGM=AMASPZAP
//SYSPRINT DD SYSOUT=*
//SYSLIB DD DSN=FORMAT4.DSCB,UNIT=SYSDA,VOL=SER=LRIP90,DISP=SHR
//SYSIN DD *
CCHHR 0000000104
VER 53 08C08010
REP 53 00C08010
VER 5D 12
REP 5D 00
/*
Now we should be able to manipulate the dataset using IEHPROGM.
//DELETE EXEC PGM=IEHPROGM
//SYSPRINT DD SYSOUT=*
//DD1 DD UNIT=3380,VOL=SER=LRIP90,DISP=SHR
//SYSIN DD *
SCRATCH DSNAME=TSTB.TRAN.FILE0.DATA,VOL=3380=LRIP90,PURGE
/*http://knowledge.storage.ibm.com is a useful mine of VSAM dataset and catalog recovery information. There are also utilities to help in the repair of a VVDS etc.

沒有留言:

張貼留言