Example: recovering a HIDAM database in a non-data-sharing environment

The following steps are an example of a full forward recovery of a HIDAM database with a secondary index in a non-data-sharing environment.

The database uses OSAM for its database data sets; however, database data sets can be OSAM or VSAM. Primary and secondary indexes are always VSAM. The database is registered to DBRC, operates in an online environment, and does not participate in data sharing. Because the database does not participate in data sharing, an accumulation of the database changes recorded in the logs is not required.

For a HIDAM database, you must back up and recover the primary index data set separately from the database data sets (DBDSs); however, you can simplify the backup and recovery process by defining DBRC groups that include the DBD names of both the database and the primary index. You can then issue GENJCL commands against the DBRC group to generate the necessary JCL for both DBDs at the same time.

To recover a HIDAM database:

Procedure

  1. If any OLDS contains database change records that are required for recovery, issue the DBRC command GENJCL.ARCHIVE to generate the necessary JCL to run the Log Archive utility (DFSUARC0).
  2. Run the Log Archive utility. The Log Archive utility archives the records in the OLDS to an SLDS.
  3. Delete and define both the OSAM database data sets and the VSAM KSDS primary index data set.
  4. Issue the GENJCL.RECOV command to generate all of the required JCL for recovery of the HIDAM database. The JCL identifies the correct image copies to use, all of the appropriate logs, all the correct ddnames, and the correct time stamps.
  5. Run the Database Recovery utility (DFSURDB0) on the database by executing the JCL that is generated by the GENJCL.RECOV command. The Database Recovery utility recovers the database data sets from the image copies and the database changes that are recorded in the logs.
  6. Issue the GENJCL.RECOV command to generate all of the required JCL for recovery of the primary index of the HIDAM database. The JCL identifies the correct image copies to use, all of the appropriate logs, all the correct ddnames, and the correct time stamps.
  7. Run the Database Recovery utility on the primary index by executing the JCL that is generated by the GENJCL.RECOV command. The Database Recovery utility recovers the primary index data set from the image copy and updates the data set with the primary index changes that are recorded in the logs.
  8. Delete and define secondary index VSAM KSDS data sets.
  9. Recover the secondary indexes by either:
    • Using the same forward recovery steps that you use to recover HIDAM DBDSs.
    • Rebuilding the secondary indexes by using a separately sold index builder tool.

The following JCL is an example of the GENJCL.RECOV commands that generate the JCL that is required for recovering a HIDAM database that has a secondary index:

//GENRECVX JOB CLASS=A,REGION=6M,                                      
//          MSGCLASS=U,NOTIFY=&SYSUID                                  
//MYLIB JCLLIB ORDER=(IMS.PROCLIB,IMSVS.CMXXX.TEAM01.JCL)      
//*                                                                    
//DELDEF1 EXEC PGM=IDCAMS                                              
//************************************************************         
//*    D E F I N E      V S A M   D A T A    D B S                     
//************************************************************         
//SYSPRINT DD  SYSOUT=*                                                
//SYSIN     DD DSN=IMSVS.CMXXX.TEAM01.UTIL(XSTAP),DISP=SHR             
//          DD DSN=IMSVS.CMXXX.TEAM01.UTIL(XSTAX),DISP=SHR             
//          DD DSN=IMSVS.CMXXX.TEAM01.UTIL(XSTAY),DISP=SHR             
//*                                                                    
//* RUN DB RECOVERY                                                    
//A   EXEC   DBRC,                      
//SYSIN DD *                                                           
 GENJCL.RECOV DBD(X1STAP) LIST DEFAULTS(T01DFLT) ONEJOB JOB(T01RJOB) - 
   MEMBER(RECV1JCL)                                                    
 GENJCL.RECOV DBD(X1STAX) LIST DEFAULTS(T01DFLT) ONEJOB JOB(T01RJOB) – 
 GENJCL.RECOV DBD(X1STAY) LIST DEFAULTS(T01DFLT) ONEJOB JOB(T01RJOB) – 

The following example shows the JCL that is generated by the GENJCL.RECOV commands to recover a HIDAM database that has a secondary index.

//T01RECOV JOB TIME=1,MSGCLASS=H,REGION=4096K,                         
//  CLASS=A                                                            
//RCV1 EXEC PGM=DFSRRC00,REGION=1300K,                                 
//             PARM='UDR,DFSURDB0,X1STAP,,,,,,,,,,,,,,,,,,,'           
//*                                                                    
//*     THIS JCL ORIGINATES FROM THE USER'S 'JCLPDS' LIBRARY.          
//*     KEYWORDS ARE REPLACED BY THE GENJCL FUNCTION OF                
//*     THE IMS/VS DATA BASE RECOVERY CONTROL FEATURE.                 
//*                                                                    
//*              JCL FOR RECOVERY.                                     
//*                                                                    
//STEPLIB   DD DSN=IMS.SDFSRESL,DISP=SHR                      
//SYSPRINT  DD SYSOUT=A                                                
//IMS       DD DSN=IMS.DBDLIB,DISP=SHR                         
//X1STAP    DD DSN=IMSVS.CMXXX.TEAM01.X1STAP,                          
//             DISP=OLD                                                
//DFSUDUMP  DD DSN=IMSVS.IMS1.TEAM01.X1STAP.D2006157.T155726,          
//             UNIT=3390,                                              
//             VOL=(PRIVATE,,,,SER=(SM4104)),                          
//             LABEL=(1,SL),                                           
//             DISP=(OLD,KEEP),DCB=BUFNO=10                            
//DFSVDUMP  DD DUMMY                                                   
//DFSUCUM   DD DUMMY                                                   
//DFSULOG   DD DUMMY                                                   
//DFSVSAMP  DD *                                                       
//SYSIN     DD *                                                       
//*...
//T01RECOV JOB TIME=1,MSGCLASS=H,REGION=4096K,                         
//  CLASS=A                                                            
//RCV1 EXEC PGM=DFSRRC00,REGION=1300K,                                 
//             PARM='UDR,DFSURDB0,X1STAX,,,,,,,,,,,,,,,,,,,'           
//STEPLIB   DD DSN=IMS.SDFSRESL,DISP=SHR                      
//SYSPRINT  DD SYSOUT=A                                                
//IMS       DD DSN=IMS.DBDLIB,DISP=SHR                         
//X1STAX    DD DSN=IMSVS.CMXXX.TEAM01.X1STAX,                          
//             DISP=OLD                                                
//DFSUDUMP  DD DSN=IMSVS.IMS1.TEAM01.X1STAX.D2006157.T155727,          
//             UNIT=3390,                                              
//             VOL=(PRIVATE,,,,SER=(SM4106)),                          
//             LABEL=(1,SL),                                            
//             DISP=(OLD,KEEP),DCB=BUFNO=10                            
//DFSVDUMP  DD DUMMY                                                   
//DFSUCUM   DD DUMMY                                                   
//DFSULOG   DD DUMMY                                                   
//DFSVSAMP  DD *                                                       
//SYSIN     DD *                                                       
//*...
//T01RECOV JOB TIME=1,MSGCLASS=H,REGION=4096K,                         
//  CLASS=A                                                            
//RCV1 EXEC PGM=DFSRRC00,REGION=1300K,                                 
//             PARM='UDR,DFSURDB0,X1STAY,,,,,,,,,,,,,,,,,,,'           
//STEPLIB   DD DSN=IMS.SDFSRESL,DISP=SHR                      
//SYSPRINT  DD SYSOUT=A                                                
//IMS       DD DSN=IMS.DBDLIB,DISP=SHR                         
//X1STAX    DD DSN=IMSVS.CMXXX.TEAM01.X1STAY,                          
//             DISP=OLD                                                
//DFSUDUMP  DD DSN=IMSVS.IMS1.TEAM01.X1STAY.D2006157.T155727,          
//             UNIT=3390,                                              
//             VOL=(PRIVATE,,,,SER=(SM4106)),                          
//             LABEL=(1,SL),                                            
//             DISP=(OLD,KEEP),DCB=BUFNO=10                            
//DFSVDUMP  DD DUMMY                                                   
//DFSUCUM   DD DUMMY                                                   
//DFSULOG   DD DUMMY                                                   
//DFSVSAMP  DD *                                                       
//SYSIN     DD *