Copying HALDBs by using an image copy

The HALDB copy utility allows you to copy a HALDB, using the latest non-fuzzy image copy, to a different IMS.

About this task

The utility transfers a production HALDB to a different IMS and allocates the target data set in that system, if the data set is not already available.

This task is typically performed when a problem is discovered in the production database, where the database cannot be kept offline until the error in the application has been identified and resolved.

This utility performs the following operations:

  • Copies the most recent HALDB definitions across to a different RECON by changing the hlq portion of the data set name.
  • Creates the necessary allocation statements.
  • Registers all non-fuzzy image copies to the new RECON.

After these operations have been performed, you can run a recovery using the new RECON.

Alternatively, you can create the JCL by using the ISPF user interface.

Procedure

  1. Locate the sample JCL for this utility in the SIHCSAMP file, member IHCECOPY.
  2. Specify the JCL DD statements.
    For a list of DD statements, see COPYDBRC DD statements.
  3. Specify the COPYDBRC command parameters.
    For a list of COPYDBRC command parameters, see COPYDBRC command parameters.

Example

Figure 1. Sample JCL from member IHCECOPY
//*------------------------------------------------------------------
//*                                                                  
//*           Copy a database to different RECON                     
//*           Once this is complete, do GENJCL.RECOV for that RECON  
//*                                                                  
//*------------------------------------------------------------------
//CRE    EXEC PGM=IHCWHALD,                                          
//            REGION=60M                                             
//STEPLIB  DD DISP=SHR,DSN=your.SIHCLOAD                             
//         DD DISP=SHR,DSN=your.SDFSRESL                             
//DFSRESLB DD DISP=SHR,DSN=your.SDFSRESL                             
//IMS      DD DISP=SHR,DSN=your.DBDLIB                               
//RECON1   DD DISP=SHR,DSN=your.RECON1                               
//RECON2   DD DISP=SHR,DSN=your.RECON2                               
//RECON3   DD DISP=SHR,DSN=your.RECON3                               
//TRACE    DD SYSOUT=*                                               
//MSGPRINT DD SYSOUT=*                                               
//SYSUDUMP DD SYSOUT=*                                               
//SYSOUT   DD SYSOUT=*                                               
//IHCSYSIN DD *                                                      
 COPYDBRC DBD(nnnnn) -                                               
         DSNPREF(new.hlq) -                                          
         DSNDBD(DBD) -                                               
         INCLIND(YES) -                                              
         COPYIC(YES) -                                               
         IDCAMS(YES) -                                               
         IDCOUT(IDCOUT) -                                            
         DATACLAS(DCL) -                                             
         STORCLAS(STOCL) -                                           
         VOLSER(VOL001) -                                            
         TODD(DBRCOUT)                                               
/*                                                                   
//DBRCOUT  DD DISP=(,PASS),SPACE=(TRK,(1,1)),UNIT=SYSALLDA           
//IDCOUT   DD DISP=(,PASS),SPACE=(TRK,(1,1)),UNIT=SYSALLDA           
//*---------------------------------------------------------         
//*           APPLY TO OTHER DBRC                                    
//*---------------------------------------------------------         
//DBRC   EXEC PGM=IHCYUTIL,                                          
//            REGION=60M                                             
//STEPLIB  DD DISP=SHR,DSN=your.SIHCLOAD                             
//         DD DISP=SHR,DSN=your.SDFSRESL                             
//DFSRESLB DD DISP=SHR,DSN=your.SDFSRESL                             
//RECON1   DD DISP=SHR,DSN=the.other.RECON1                          
//RECON2   DD DISP=SHR,DSN=the.other.RECON2                          
//RECON3   DD DISP=SHR,DSN=the.other.RECON3                 
//IMS      DD DISP=SHR,DSN=your.DBDLIB                      
//TRACE    DD DUMMY                                         
//SYSPRINT DD SYSOUT=*                                      
//MSGPRINT DD SYSOUT=*                                      
//SYSIN    DD DISP=(OLD,DELETE),DSN=*.CRE.DBRCOUT           
//IHCSYSIN DD *                                             
   RUN   PGM(IHCYDBR0)                                      
//*---------------------------------------------------------
//*           ALLOCATE NEW FILES                            
//*---------------------------------------------------------
//IDC    EXEC PGM=IDCAMS,DYNAMNBR=99,                       
//            REGION=50M,COND=(4,LE)                        
//SYSPRINT DD SYSOUT=*                                      
//SYSIN    DD DISP=(OLD,DELETE),DSN=*.CRE.IDCOUT            
//