Generating a compare batch job for a multi-target import
A multi-target import is the process of importing changes from a compare job to objects on multiple target environments. When you generate a batch job for this import, register the change with Change Management (CM) so that you can later import the change to objects on multiple target environments.
Before you begin
This procedure is a subtask of 5. Generating a compare job. You must have identified the source and target objects and optionally any masks and ignores and have the Generate Compare Jobs (GOC5) panel displayed.
About this task
As part of this task of importing changes from a compare job to objects on multiple target environments, you can specify masks for the compare job on one or more of the following panels:
- Specify Compare Masks (GOC3) panel
- Specify masking on this panel if your compare source and target object use different naming conventions.
- CM Register Options (ADB2CRO) panel
- Specify masking on this panel if your multi-target change uses different naming conventions than your compare target.
- CM - Update Associated Target panel (ADBPCMTU) panel
- Specify masking on this panel if your multiple target systems use different naming conventions than your multi-target change.
The masking that you specify on one panel does not override the masking that you specify on another panel. All specified masks are applied.
Procedure
-
On the Generate Compare Jobs (GOC5) panel, specify values for the compare
job options as follows, and press Enter:
- Set Generate Online to NO.
- Specify values for the other options as needed. See Compare job options.
Tips:- To view only the minimal number of options that you need to set to run a comparison, use the simple display mode. You can toggle between simple and advance mode by using the SIM and ADV commands. For more information about these display modes, see Simple and advanced display modes.
- Set Save compare results to YES if you want to analyze data about the comparison, ignore changes, or increase the efficiency of subsequent comparisons. The saved compare results contain information about objects that were part of the comparison, including detected differences, changes to make, and how those changes are to be implemented. You can save the compare results only for tables, indexes, global variables, and distinct data types.
After you press Enter, one of the following panels is displayed:
- If CM is mandatory for your SQL ID, the CM Register Options (ADB2CRO) panel is displayed.
- If CM is optional for your SQL ID, the Change Management Prompt (ADB2CMRO) panel is displayed:
- If the Change Management Prompt (ADB2CMRO) panel is displayed, specify YES, and press Enter.
-
On the CM Register Options (ADB2CRO) panel, specify a name for
the change and set Multi-target change to
YES. You can also optionally specify a mask.
ADB2CRO n -------------------- CM - Register Options -------------------- 16:25 Command ===> Commands: NEXT DB2 System: DD1A DB2 SQL ID: ADM001 Specify the following values to register a change: Owner . . . . . . . . ADM001 > (Optional, Default is ADM001) Name . . . . . . . . TEST2 > Comment . . . . . . . > Multi-target change . YES (Yes/No, Default is NO) Target name . . . . PSVTEST > (Optional, ? to lookup) Group name . . . . > (Optional, ? to lookup) Replace existing change . . ('/' to replace, Default is BLANK) Specify the owner and name values to use for this change (? to lookup): Owner Name Ignore . . . . . . . > > Mask . . . . . . . . > > - Issue the NEXT command, and press Enter.
-
If the Insert a Target (ADBPC911) panel is displayed, complete
the fields to add a target, and press Enter.
For help on defining targets for Change Management, see Setting up the targets (IBM Db2 Administration Tool for z/OS 13.1.0).
-
On the Associate Targets (ADBPCMT) panel, use the line
commands to add and edit targets as needed.
DB2 Admin --------------- CM - Associate Targets ------------- Row 1 to 1 of 1 Command ===> Scroll ===> CSR Details for multi-target change: PEDRO.TEST1 DB2 System: DD1A DB2 SQL ID: ADM001 Commands: NEXT Line commands: U - Update D - Delete AT - Add targets AG - Add targets from group I - Interpret ? - Show all line commands Target Change Change Sel Name DB2 Location Owner name Status * * * * * --- -------> ------------> --------- ---------------------- ----------------- PSVTEST DBAD NEW ******************************* END OF DB2 DATA *******************************To update an existing target, specify the U line command next to the target. Then, on the CM - Update Associated Target panel (ADBPCMTU) panel, under Target Overrides:, specify new values for the change owner, change name, mask owner, and mask name:
Figure 1. CM - Update Associated Target panel (ADBPCMTU) panel ADBPCMTU n ------------- CM - Update Associated Target --------------- 10:05 Command ===> Press Enter to confirm changes. Name . . . . . . . . . : PSVTEST DB2 location . . . . . : DBAD Target Defaults: Mask owner . . . . . : USER02 Mask name . . . . . : MASKUSR2 > Target Overrides: Change owner . . . . . PSV01 > Change name. . . . . . TEST2 > Mask owner . . . . . . USER02 > Mask name . . . . . . MASKUSR2 >Then press Enter to save your changes. If you exit (PF3), the values are not saved.
- On the Associate Targets (ADBPCMT) panel, issue the NEXT command, and press Enter.
-
Complete the requested input on any subsequent panels that are displayed.
One or more of the following panels might be displayed depending on the compare job options that you selected. For more information about one of these panels, see the related option or panel description.
Table 1. Panels that might be displayed when generating a compare job Panel Related option on Generate Compare Jobs (GOC5) panel or panel description Save Compare Results (ADB2C22) panel Save compare results Specify Compare Reporting Options (GOC5RO) panel Compare reporting options Specify Data Set Name for Apply Jobs (GOC5AJ) panel Generate apply jobs Specify Work Statement List Data Set (ADB2WLDA) panel As work statement list Specify Work Statement List (ADB27WLD) panel As work statement list Specify Work Statement List Data Set (GOC5WL) panel As work statement list Specify Job Parameters (ADB2W1R) panel As work statement list REBIND options (ADBPREBO) panel REBIND options DB2 Object Compare Warning (GOCGCMPW) panel Generate apply jobs -
On the Specify Register Mode (GOC5RM) panel specify one of
the following actions to take for any pending changes to the objects on the target system
that are affected by this change, and press Enter:
- Cancel
- Do not register the change if pending changes exist.
- Prereq
- Make the pending changes for the affected objects prerequisite changes for this change.
- Supersede
- Make this change a prerequisite change for the pending changes.
Figure 2. Specify Register Mode (GOC5RM) panel Compare --------------------- Generate Compare Jobs --------------------------- Option ===> Specify the following for DB2 Object Comparison Tool: Worklist information: Worklist name . . . . . . . PQ76055N (also used as middle qualifier in DSNs) Co.------------------------------------------------------—---------------—--. | Compare ----------------- Specify Register Mode ----------------- 09:23 | | | | Pending changes action . . . (Cancel, Prereq, Supersede) | | | Ch| | | | Da| | | | '------------------------------------------------------—---------------—--' -
If you requested a batch job (the Generate online option is set
to NO), edit the generated JCL job as needed and submit it to run
the comparison. Otherwise (if Generate online is set to
YES) , the comparison process is run online.
For information about the Object Comparison Tool parameters in the generated JCL job, see Parameters in the generated compare batch job.