A RC/Migrator for Db2 for z/OS (RCM) 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.
Consider using a RCM Quick Migration. It is called a "Quick" migration because a permanently stored strategy is not created unlike creating a Migration strategy using RC/Migrator Strategy Services.
An easy way to generate JCL to use as a model is to create a 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 quick migration of tablespaces, tables and indexes in database dbname:
This generated batch processor code does a migration at DATABASE level (dbname) along with all the dependent objects and sends the analysis to Managed Output(OUTPUT DDL_TABLE).
//PARMFILE DD *
STRTSSID ssid
CREATOR authid1
QUICKM
DATABASE authid1 dbname
IMPLODE STOGROUP
EXPLODE TABLESPACE
EXPLODE TABLE
EXPLODE INDEX
EXPLODE VIEW
EXPLODE SYNONYM
EXPLODE TRIGGER
EXPLODE MQTB_T
EXPLODE MQTB_I
EXPLODE MQTB_V
EXPLODE MQTB_S
EXPLODE MQVW_VW
EXPLODE MQVW_I
EXPLODE MQVW_V
EXPLODE MQVW_S
EXPLODE ROUTINE
QUICKEND
TRGSSID ssid
OUTPUT DDL_TABLE
AUXIMP N
MQTIMP N
REFMQT N
RI GLOBAL
LOBTOO
SEQIMP
RTNIMP
RTNIIO N
SQLID authid1
DATASTAT
NOAUTHS
RIONLY
HEADER
TRAILER
REPINDDL
DELUNLD
DELTEMP
PREFIX authid1
MODEL4 @DEFAULT
MODEL4C authid1
/*
This batch processor code does a migration at DATABASE level (dbname) along with all the dependent objects and sends the analysis to a dataset(member).
//DDLFILE DD DISP=SHR,
// DSN=hlq.analysis.output(member)
//PARMFILE DD *
STRTSSID ssid
CREATOR authid1
QUICKM
DATABASE authid1 dbname
IMPLODE STOGROUP
EXPLODE TABLESPACE
EXPLODE TABLE
EXPLODE INDEX
EXPLODE VIEW
EXPLODE SYNONYM
EXPLODE TRIGGER
EXPLODE MQTB_T
EXPLODE MQTB_I
EXPLODE MQTB_V
EXPLODE MQTB_S
EXPLODE MQVW_VW
EXPLODE MQVW_I
EXPLODE MQVW_V
EXPLODE MQVW_S
EXPLODE ROUTINE
QUICKEND
TRGSSID ssid
AUXIMP N
MQTIMP N
REFMQT N
RI GLOBAL
LOBTOO
SEQIMP
RTNIMP
RTNIIO N
SQLID authid1
DATASTAT
NOAUTHS
RIONLY
HEADER
TRAILER
REPINDDL
DELUNLD
DELTEMP
PREFIX authid1
MODEL4 @DEFAULT
MODEL4C authid1
/*