Limited support BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see ALTER and BMC AMI Change Manager for Db2 13.1.

Using a script to perform a comparison


The CMP_STRUCTURE_CHG script in the CM/PILOT component of 

BMC AMI Change Manager for Db2

 contains the steps to perform a comparison and generate a CDL file if differences exist between the data structures.

If the Change Manager Compare component finds no differences, CM/PILOT worklist processing stops and an Analysis worklist is not created. If differences exist, a CDL file is created and imported, and an Analysis worklist is created to apply the changes. This example assumes that the comparison, import, analysis, and execution are performed on the same subsystem. For more information about scripts, see Using-scripting-tools-to-automate-change-management.

In this task, you create and execute a task ID.

Before you begin

Depending on the inputs specified for the comparison, any of the following items can be required:

Item

Reference

DDL file

Change Manager worklist

DDL baseline

Catalog baseline

Catalog baseline profile containing scope rules

Outbound migrate profile containing scope rules, change rules, or locations

Inbound migrate profile containing change rules

Alter-type work ID

To create a task ID

  1. On the BMC AMI Change Manager for Db2 Main Menu, select CM/PILOT, and press Enter.
  2. On the CM/PILOT Main Menu, select TASKIDs and press Enter.
  3. On the TASKID Action Menu, type the name of a new TASKID and select Create a TASKID. Then, press Enter.
  4. On the Script Selection List, select Change data structures using a Compare trigger, and press Enter.
  5. On the Create TASKID panel, specify the information for a task ID.
    1. CM/PILOT uses the name of the task ID as the name for a new alter-type work ID. You can type a different name for WORKID or type the name of a work ID name template.
    2. (Optional) Type the name of a CM/PILOT Application. An Application groups a set of Change Manager profiles. For more information about Applications, see Using-scripting-tools-to-automate-change-management.
    3. (Optional) Specify a Comment to describe the task ID.
    4. Press END.The task ID is created.

To execute the task ID

  1. On the TASKID Action Menu, select Execute a TASKID and press Enter .
  2. On the TASKID Interface panel, specify the data set names to be used by CM/PILOT.
    1. Type the data set name for the CM/PILOT Worklist.
    2. Type the data set name for the CM/PILOT JCL.
    3. Type the data set name for Diagnostics or type SYSOUT.
  3. Select the method of executing the CM/PILOT worklist.For more information about executing a CM/PILOT worklist, see Processing-CM-PILOT-worklists.
  4. (Optional) Override the options that are set in Change Manager.
    1. Type S to select Override 

      Change Manager

       options and then press Enter.

    2. On the Override Change Manager Options panel, select Override 

      Change Manager

       Options.

    3. Type S to select the Change Manager Analysis and Execution options that you want to override, and press Enter.For more information about the Change Manager options, see Using-options-to-control-your-environment.

      Warning

      BMC does not recommend that you select the Autosubmit override option. This powerful option automatically submits the JCL, which is created from the CM/PILOT generated worklist, to Execution. When you use the Autosubmit override option, use caution because any error in your specifications might cause significant damage to your schemas and a loss of data.

    4. Press END.
  5. On the TASKID Interface panel, create a CM/PILOT worklist.
    1. Type S to select Create Worklist. Then, press Enter.
    2. On the Step Settings panel, type S to select Step 1 Compare, and press Enter.
    3. On the TASKID Compare Step Options panel, select the structures that you want to compare, and press Enter. (For this example, Catalog was selected for Compare1 Type and Compare2 Type.)
    4. (Optional) On the Step Settings panel is displayed, to modify the Analysis step, type S to select Step 2 Analysis step and press Enter.
    5. (Optional) To modify the Execution step, type S to select Step 3 Execution step and press Enter.

To specify the inputs for the comparison

  1. Press Enter.
  2. On the Compare Catalog to Catalog Scope Selection panel, select One catalog object and all of its dependents as the source of the scope. Press Enter.

    Note

    To select multiple catalog objects, specify scope rules in a baseline profile or an outbound migrate profile and select to use the profile as the source of the scope. For information, see Using-a-profile-to-scope-a-catalog-to-a-catalog-comparison.

  3. On the Compare Catalog to Catalog panel, type the abbreviation for an object type.
  4. If you plan to use a wildcard for Name - part 1, Name - part 2, or Name - part 3, type Y to display a list of objects in a mixed list.
  5. Specify the values for Compare1.
    1. Type the name of the object.
      • If the name of the object has only one part, for Name - part 1, type the name or owner, or type a wildcard to specify an object from a list of objects.
      • If the name of the object has two parts, specify the following information:
        • For Name - part 1, type the name or owner, or type a wildcard to specify an object from a list of objects.
        • For Name - part 2, type the name of a single object or type a wildcard to specify an object from a list of objects.
      • If the name of the object has three parts (such as a stored procedure), specify the following information:
        • For Name - part 1, type the name or owner, or type a wildcard to specify an object from a list of objects.
        • For Name - part 2, type the name of a single object or type a wildcard to specify an object from a list of objects.
        • For Name - part 3, type the name of an object or type a wildcard to specify an object from a list of objects.
    2. (Optional) To limit the scope of the comparison, type the name of the table owner.
    3. (Optional) Specify the name of the location of the remote Db2 subsystem. As an alternative, you can type a wildcard for the location name to generate a list of remote locations from which you can select.
  6. Specify the values for Compare2.
    1. Repeat Step 5.
    2. (Optional) Specify the name of an outbound migrate profile for Compare2. The outbound migrate profile must contain change rules to resolve the names of the objects and creators.  Change Manager applies the change rules to the objects in Compare2 before the comparison.
  7. Press Enter.If you chose to display a list of objects in a mixed list in Step 4, the Mixed List panel is displayed. Otherwise, the Compare CDL Options panel is displayed (proceed to Step 8).
  8. From the Mixed List panel, you can perform one of the following actions:
    • Type S to select a single object to use in the comparison. Then, press Enter.
    • Press END to exit the mixed list. All of the objects listed on the mixed list will be included in the comparison.
  9. Press Enter.
  10. On the Taskid Compare CDL Options panel, specify the object types and attributes for the comparison.
    1. Type Y or N for each object type that you want to include in or exclude from the comparison.
    2. Type to display a list of the object attributes to include in or exclude from the comparison.
    3. Press Enter.If you chose to display a list of the object attributes in Step 10.a, the Compare Object Attributes panel is displayed. Otherwise, the TASKID Migrate Profiles panel is displayed (proceed to Step 13).
  11. On the Compare Object Attributes panel, specify the object attributes.
    1. To include an object attribute in the comparison, type Y adjacent to the attribute.
    2. If you specified to include the partition attributes, you can exclude one or more of the partition attributes. Type N adjacent to the attributes that you want to exclude.
    3. Press Enter.
  12. On the Taskid Compare CDL Options panel, press Enter.
  13. On the TASKID Migrate Profiles panel, specify the migrate profiles.
    1. (Optional) Specify the name of an outbound migrate profile. The outbound migrate profile can contain change rules and locations. Change Manager applies the rules after it performs the comparison (when it generates the CDL).
    2. (Optional) Specify the name of an inbound migrate profile. The inbound migrate profile can contain change rules. It can be used when the CDL that is generated from the comparison is imported.
    3. Press Enter.
  14. On the Change Manager Datasets panel, specify the data set names to be used by the Analysis and Execution components of Change Manager. Then, press Enter.
  15. On the TASKID Interface panel, select your options for processing the CM/PILOT worklist.

    1. To edit the CM/PILOT worklist, type S to select Edit Worklist.
    2. To create the JCL to run the worklist, type S to select Create JCL.
    3. To review or modify the JCL, type S to select Edit JCL.
    4. To submit the JCL to run the CM/PILOT worklist, type S to select Submit JCL.
    5. Press Enter.

    CM/PILOT creates an Analysis worklist and the Execution JCL that is required to run the worklist.

  16. To run the comparison and to import the resulting CDL into an alter-type work ID, execute the Analysis worklist.

    Note

    The JCL that you use to execute the Analysis worklist is contained in the data set that you specified for JCL Dataset Name in the Change Manager Datasets panel.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*