Recovering VSAM volume data sets that are out of space or destroyed
If the VSAM volume data set (VVDS) is out of space or destroyed, you can recover from the situation. You can recover by using Db2 commands, Db2 utilities, and access method services.
Symptoms
Db2 sends the following message to the master console:
DSNP012I - DSNPSCT0 - ERROR IN VSAM CATALOG LOCATE FUNCTION
FOR data_set_name
CTLGRC=50
CTLGRSN=zzzzRRRR
CONNECTION-ID=xxxxxxxx,
CORRELATION-ID=yyyyyyyyyyyy
LUW-ID=logical-unit-of-work-id=token
VSAM might also issue the following message:
IDC3009I VSAM CATALOG RETURN CODE IS 50, REASON CODE IS
IGGOCLaa - yy
In this VSAM message, yy is 28, 30, or 32 for an out-of-space condition. Any other values for yy indicate a damaged VVDS.
Environment
Your program is terminated abnormally, and one or more messages are issued.Resolving the problem
Operator response: Begin
by determining whether the VSAM volume data set is out of space or
has been destroyed. Then follow these steps:
- Determine the names of all table spaces that reside on the same volume as the VVDS. To determine the table space names, look at the VTOC entries list for that volume, which indicates the names of all the data sets on that volume.
- Use the Db2 COPY
utility to take image copies of all table spaces of the volume. Taking
image copies minimizes reliance on the Db2 recovery
log and can speed up the processing of the Db2 RECOVER
utility (to be mentioned in a subsequent step).
If you cannot use the COPY utility, continue with this procedure. Be aware that processing time increases because more information must be obtained from the Db2 recovery log.
- Use the command STOP DATABASE for all the table spaces that reside on the volume, or use the command STOP DB2 to stop the entire Db2 subsystem if an unusually large number or critical set of table spaces are involved.
- If possible, use access method services to export all non-Db2 data sets that resides on that volume.
- Use access method services to recover all non-Db2 data sets that resides on that volume.
- Use access method services DELETE and DEFINE commands
to delete and redefine the data sets for all user-defined table spaces
and Db2-defined
data sets when the physical data set has been destroyed. Db2 automatically
deletes and redefines all other STOGROUP-defined table spaces.
You do not need to delete and redefine table spaces that are STOGROUP-defined because Db2 takes care of them automatically.
- Issue the Db2 START DATABASE command to restart all the table spaces that were stopped in step 3. If the entire Db2 subsystem was stopped, issue the START DB2 command.
- Use the Db2 RECOVER utility to recover any table spaces and indexes.