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.

Creating a script


Use the following procedure to create CM/PILOT scripts to perform many of the 

BMC AMI Change Manager for Db2

 processes.

You can create a new script, or you can copy a BMC-supplied script or a user-defined script, modify it, and save it with a new name.

To create a script

  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 Scripts and press Enter.
  3. On the Script Action Menu, type a name for the Script and select Create a Script. Then, press Enter.
  4. On the Create Script panel, specify the information to create the script.
    1. Specify the WORKID Type.
      • Alter requests changes to object definitions that reside within the same Db2 subsystem.
      • Migrate specifies data structure definitions to be migrated from one Db2 subsystem to another, or duplicates structures within the same subsystem.
      • Receive receives migration when data structures are being created on a different subsystem.
    2. Specify whether DML statements are required in the script. DML is an SQL-like data manipulation language, with statements to update, delete, and migrate data structures.
    3. (Optional) Specify a Comment to describe the script.
    4. Type S to select Create or Edit Script Steps.
    5. Press Enter.
  5. On the Step Selection List panel , type E in the Act column adjacent to the step that you want to edit.
  6. On the Edit Step panel, specify the information for the step in the script.
    1. Specify the Change Manager process that you want to include in the script.

       

      Task

      Reference

      To create a baseline step

      To create a comparison step

      To create an import step

      To create an analysis step

      To create an execution step

      To create a baseline report step

      To create a replicate work ID step

    2. Type S to select Specify options for this step.
    3. Press Enter.
  7. When you have specified the information for a step for the script, press END.
  8. On the Step Selection List, type an action code.
    • To add an additional step, type I in the Act column adjacent to a step.
    • To edit the options in a step, type O in the Act column adjacent to the step.
  9. Press END.
  10. On the Create Script panel, press END.

To create a baseline step

  1. To create a step in the script that performs the baseline process, select the Baseline Process in the Edit Step panel (see Step 6).The Baseline Step Options panel is displayed, as shown in the following figure.

    AUCFSTBO ---------------------- Baseline Step Options -------------------------
    Command ===>                                                                  
                                                                                  
    Script  . . . . . . . : RDACRJ.SCR01                                           
    Step Number . . . . . : 1                                                      
                                                                                  
    Select baseline step options. Then press Enter.                                
       Baseline Source Type  1  1. Catalog                                         
                                2. DDL                                             
                                3. Worklist                                        
       NoBaseline  . . . . . _   Enter Y to apply delete parms only                 
       Deleteage . . . . . . 0   Override deleteage                                 
       Retainmax . . . . . . 0   Override retainmax                                 
       Protect . . . . . . . _   Enter Y to protect this baseline                   
       Baseline Template . .                                                        
                                                                                  
      Lock Options  . . . . _ Enter Y to lock step options                         
                                                                                  
                                                                                  
                              
    Commands:  HELP END CANCEL
  2. Specify the information for a baseline. For more information about creating baselines, see Taking-a-snapshot-of-a-database-environment.If you want to prevent others from overriding the options that you specify in this panel, type Y to select Lock Options.

    Note

    When you select Lock Options, the baseline step does not appear in the Step Settings panel when you execute the task ID for the script. The only steps that appear in this panel are those that can be modified.

  3. Press Enter to validate your options, and then press END.The Step Baseline Profile Options panel is displayed, as shown in the following figure.

    AUCFSTA1 ------------------ Step Baseline Profile Options ---------------------
    Command ===>                                                                  
                                                                                  
    Script  . . . . : RDACRJ.SCR01                                                 
    Step Number  .  : 1                                                            
    Process  . . .  : BASELINE                                                     
                                                                                  
    Select type of Step Baseline Profile option.                                   
                                                                                  
     1 1. Prompt for a Baseline Profile for this step when generating              
          a CM/Pilot Worklist.                                                     
       2. Specify a default Baseline Profile for this step.                        
       3. Specify a Baseline Profile that will always be used in this              
          step.  Cannot overide when generating a CM/Pilot Worklist.               
                                                                                  
    Type a Baseline Profile, or type a wildcard pattern for a selection            
    list, if Step Baseline Profile Option is 2 or 3.  Then press Enter.            
                                                                                  
      Baseline Profile                                                             
                                                                                  
                                                                                  
                                                                                  
    Commands:  HELP END CANCEL
  4. Specify the options for the baseline profile, and then press END.

To create a comparison step

  1. To create a step in the script that performs the comparison process, select the Compare Process in the Edit Step panel (see Step 6).The Compare Step Options panel is displayed, as shown in the following figure.

    AUCFSTCO ---------------------- Compare Step Options --------------------------
    Command ===>                                                                  
                                                                                  
    Script  . . . . . . . : RDACRJ.SCR01                                           
    Step Number . . . . . : 1                                                      
                                           Select Compare2 type, where the objects
    Select Compare1 type, where the        already have the desired structure      
    resulting CDL will be applied.         definitions.                            
    Compare1 Type . .  2 1. Baseline        Compare2 Type . . 2 1. Baseline         
                         2. Catalog                             2. Catalog          
                         3. DDL                                 3. DDL              
                         4. Worklist                            4. Worklist         
                         5. WORKID                                                  
                                                                                  
    Select Compare step options.                                                   
      Lock Step Options . . _ Enter Y to lock step options                         
                                                                                  
                                                                                  
                                                                                   
                                                                                  
                                                                                  
    Commands:  HELP END CANCEL
  2. Specify the information for performing a comparison. For more information about comparing data structures, see Comparing-database-environments.If you want to prevent others from overriding the options that you specify in this panel, type Y to select Lock Step Options.

    Note

    When you select Lock Step Options, the compare step does not appear in the Step Settings panel when you execute the task ID for the script. The only steps that appear in this panel are those that can be modified.

  3. Press Enter to validate your options, and then press END.The Step Migrate Profile Options panel is displayed, as shown in the following figure.

    AUCFSTC1 ------------------ Step Migrate Profile Options ----------------------
    Command ===>                                                                  
                                                                                  
    Script  . . . . : RDACRJ.SCR01                                                 
    Step Number  .  : 1                                                            
    Process  . . .  : COMPARE                                                      
                                                                                  
    Select Migrate Profile option.                                                 
     1 1. Prompt for an Outbound Migrate Profile for this step when generating     
          a CM/Pilot Worklist.                                                     
       2. Do not specify a Migrate Profile for this step.                          
       3. Specify a default Outbound Migrate Profile for this step.                
       4. Specify an Outbound Migrate Profile to be used in this step.  It cannot  
          be overriden when generating a CM/Pilot Worklist.                        
                                                                                  
    Type an Outbound Migrate Profile, or type a wildcard pattern for a selection   
    list, if Step Migrate Profile Option is 3 or 4.  Then press Enter.             
                                                                                  
      Migrate Profile                                                              
                                                                                  
                                                                                  
    Commands:  HELP END CANCEL
  4. Specify the options for an outbound migrate profile, and then press END.

To create an import step

  1. To create a step in the script that performs the import process, select the Import Process in the Edit Step panel (see Step 6).

    Note

    If your script requires DML, you cannot create a step in the script that performs the import process.

    The Import Step Options panel is displayed, as shown in the following figure.

    AUCFSTIO ----------------------- Import Step Options --------------------------
    Command ===>                                                                  
                                                                                  
    Script  . . . . . . . : RDACRJ.SCR01                                           
    Step Number . . . . . : 1                                                      
                                                                                  
    Select import step options.  Then press Enter.                                 
      Source Type . . . . . 1 1. CDL                                               
                              2. DDL                                               
      Lock Step Options . . _ Enter Y lock step options                            
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
    Commands:  HELP END CANCEL
  2. Specify the information for importing a CDL or DDL file. For more information about importing external files, see Altering-data-structures-in-a-database-environment.If you want to prevent others from overriding the options that you specify in this panel, type Y to select Lock Step Options.

    Note

    When you select Lock Step Options, the import step does not appear in the Step Settings panel when you execute the task ID for the script. The only steps that appear in this panel are those that can be modified.

  3. Press Enter to validate your options, and then press END.The Step Migrate Profile Options panel is displayed, as shown in the following figure.

    AUCFSTI1 ------------------ Step Migrate Profile Options ----------------------
    Command ===>                                                                  
                                                                                  
    Script  . . . . : RDACRJ.SCR01                                                 
    Step Number  .  : 1                                                            
    Process  . . .  : IMPORT                                                       
                                                                                  
    Select type of Step Migrate Profile option.                                    
                                                                                  
     1 1. Prompt for an Inbound Migrate Profile for this step when generating      
          a CM/Pilot Worklist.                                                     
       2. This step will not use an Inbound Migrate Profile.   Do not prompt       
          for one when generating a CM/Pilot Worklist.                             
       3. Specify a default Inbound Migrate Profile for this step.                 
       4. Specify an Inbound Migrate Profile that will always be used in this      
          step.  Cannot overide when generating a CM/Pilot Worklist.               
                                                                                  
    Type an Inbound Migrate Profile, or type a wildcard pattern for a selection    
    list, if Step Migrate Profile Option is 3 or 4.  Then press Enter.             
                                                                                  
      Migrate Profile                                                              
                                                                                  
    Commands:  HELP END CANCEL
  4. Specify the options for an inbound migrate profile, and then press END.

To create an analysis step

  1. To create a step in the script that performs the analysis process, select the Analysis Process in the Edit Step panel (see Step 6).The Analysis Step Options panel is displayed, as shown in the following figure.

    AUCFSTAO ---------------------- Analysis Step Options -------------------------
    Command ===>                                                                  
                                                                                  
    Script  . . . . . . : RDACRJ.SCR01                                             
    Step Number  .  . . : 1                                                        
                                                                                  
    Select analysis step options. Then press Enter.                                
      Type of analysis                                                             
       1 1.  Generate a worklist which will convert and reload current data.        
         2.  Generate a worklist which will convert and reload current data and     
             establish a full recovery baseline.                                    
         3.  Generate a worklist which will reload data from a previous             
             full recovery baseline.                                                
                                                                                   
      Lock Options  . . . N (Y/N)                                                  
                                                                                  
                                                                                   
                                                                                  
                                                                                   
                                                                                   
                                                                                   
                                                                                   
    Commands:  HELP END CANCEL
  2. Specify the information for analyzing a work ID and generating a worklist. For more information about the analysis process, see Migrating-database-environments.If you want to prevent others from overriding the options that you specify in this panel, type Y to select Lock Options.

    Note

    When you select Lock Options, the analysis step does not appear in the Step Settings panel when you execute the task ID for the script. The only steps that appear in this panel are those that can be modified.

  3. Press Enter to validate your options, and then press END.

To create an execution step

  1. To create a step in the script that performs the execution process, select the Execution Process in the Edit Step panel (see Step 6).The Execution Step Options panel is displayed, as shown in the following figure.

    AUCFSTEO --------------------- Execution Step Options -------------------------
    Command ===>                                                                  
                                                                                  
    Script  . . . . . . : RDACRJ.SCR01                                             
    Step Number  .  . . : 1                                                        
                                                                                  
    Select execution step options. Then press Enter.                               
      Dataset Sizing          1 1. No 2.Runstats 3.BMC Stats 4.Sample VSAM Object  
      Pre-Execution Compare   1 1. Do not do a compare before execution            
                                2. Compare two previous baselines                  
                                3. Compare a previous baseline to the current      
                                   catalog                                         
      Pre-Execution Baseline  1 1. Do not build a baseline before execution        
                                2. Build a baseline before execution               
      Post-Execution Compare  1 1. Do not do a compare after execution             
                                2. Compare previous baselines to the new catalog   
                                3. Compare the baseline built during a previous    
                                   job step to the new catalog                     
      Post-Execution Baseline 1 1. Do not build a baseline after execution         
                                2. Build a baseline after execution                
      Lock Step Options . . . N (Y/N)                                              
                                                                                  
    Commands:  HELP END CANCEL
  2. Specify the information for a executing a worklist. For more information about the execution process, see Migrating-database-environments.If you want to prevent others from overriding the options that you specify in this panel, type Y to select Lock Step Options.

    Note

    When you select Lock Step Options, the execution step does not appear in the Step Settings panel when you execute the task ID for the script. The only steps that appear in this panel are those that can be modified.

  3. Press Enter to validate your options, and then press END.

To create a baseline report step

  1. To create a step in the script that creates a baseline report, select the Baseline Report Process in the Edit Step panel (see Step 6).The Baseline Report Step Options panel is displayed, as shown in the following figure.

    AUCFSTRO ------------------ Baseline Report Step Options ----------------------
    Command ===>                                                                  
                                                                                  
    Script  . . . . . . . : RDACRJ.SCR01                                           
    Step Number . . . . . : 1                                                      
                                                                                  
    Select baseline report step options.  Then press Enter.                        
      Lock Step Options . . _ Enter Y to lock step options                         
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
    Commands:  HELP END CANCEL
  2. If you want to prevent others from overriding the options that you specify in this panel, type Y to select Lock Step Options.

    Note

    When you select Lock Step Options, the baseline report step does not appear in the Step Settings panel when you execute the task ID for the script. The only steps that appear in this panel are those that can be modified.

  3. Press Enter to validate your options, and then press END.

To create a replicate work ID step

  1. To create a step in the script that replicates a work ID, select the Replicate WORKID Process in the Edit Step panel (see Step 6).The Replicate WORKID Step Options panel is displayed, as shown in the following figure.

    AUCFSTWO ------------------ Replicate WORKID Step Options ---------------------
    Command ===>                                                                  
                                                                                  
    Script  . . . . . . . : RDACRJ.SCR01                                           
    Step Number . . . . . : 1                                                      
                                                                                  
    Select replicate WORKID step options.  Then press Enter.                       
      Replace Option   . . . . 2 1.  Replace existing WORKIDS                      
                                 2.  Do not replace existing WORKIDS               
      Lock Step Options . . _ Enter Y lock step options                            
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
    Commands:  HELP END CANCEL
  2. Specify the information for replicating a work ID. For more information about replicating work IDs, see Altering-data-structures-in-a-database-environment.If you want to prevent others from overriding the options that you specify in this panel, type Y to select Lock Step Options.

    Note

    When you select Lock Step Options, the replicate work ID step does not appear in the Step Settings panel when you execute the task ID for the script. The only steps that appear in this panel are those that can be modified.

  3. Press Enter to validate your options, and then press END.

Related topic

 

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