How do you generate a one-step migration to run in batch?

Document ID : KB000025492
Last Modified Date : 27/02/2018
Show Technical Document Details
Question:

A migration strategy is usually created online and it can be tedious if you need to create a large number of migrations or want to automate the process. 

Is it possible to create a batch job for migration?

 

 

Answer:

Consider using Quick Migration.

An easy way to generate JCL to use as a model is to create a regular Quick Migration and select Execution Mode Batch, then P - Preview JCL. Since the objects in the strategy are referenced in the PARMFILE DD control cards, unlike a normal migration where they are defined in the strategy, you can customize the control cards for your use.


Here is an example of the control cards for a migration of tablespaces, tables and indexes in database PTDB:
//PARMFILE DD   *                       
 STRTSSID D11A                          
 CREATOR  DB2ADM                       
 QUICKM                                 
 DATABASE DB2ADM     PTDB            
 EXPLODE  TABLESPACE                  
 EXPLODE  TABLE                       
 EXPLODE  INDEX                       
 QUICKEND                               
 TRGSSID  D11B                          
 OUTPUT   DDL_TABLE                     
 RTNIMP                                 
 RTNIIO   N                             
 HEADER                                 
 TRAILER                                
 REPINDDL                               
 DELUNLD                                
 DELTEMP                                
 PREFIX   DB2ADM                       
 MODEL4   @DEFAULT                      
 MODEL4C  DB2ADM                      
/*