Export to DB2

Start of changeUse the HDB Export facility to export data that has been loaded into HDB container data sets so that it can be accessed using the CICS® PA plug-in.End of change

Start of change This option can also be used to upgrade data in an existing table using a new template or statistics definition (see Upgrading DB2 tables).End of change

  1. On the Historical Database menu, select option 5 Export.

    The list of HDBs appears.

  2. Select the HDB that you want to export.
    The Export HDB panel appears, showing the list of container data sets for the selected HDB:
      File  Options  Help 
    ────────────────────────────────────────────────────────────────────────────── 
                              Export SUMMARY HDB - EXPLORE5        Row 1 to 1 of 1 
    Command ===> _________________________________________________ Scroll ===> PAGE 
    
    Select to export HDB data sets to DB2.
    
    HDB Name . . : EXPLORE5     Type . . : SUMMARY 
    
       Data Set Name                                   ------ Start ------ Volume 
       USER.EXPLORE5.D12339.T140224.HDB                  2012/12/04 00:06:00 DB0037 
    ******************************* Bottom of data ********************************
  3. Enter S next to the container data sets whose data you want to export.

    An HDB can consist of several data sets. You can export from one or more container data sets.

    If you selected a Statistics HDB, you are prompted to select one or more statistics reports.

  4. If the Statistics Reports panel is visible, enter S next to the reports to export.
    The HDB Export Option Menu appears:
    Figure 1. HDB Export Option Menu
                  HDB Export Option Menu
                    
     Select an option then press Enter.
        1. Create DDL to define table
        2. Load data into table
        3. Upgrade table to current version 

    Exporting an HDB to DB2 is a two-step process. First, you use this panel to create and submit JCL that defines the DB2 tables (and, optionally, the database and storage group) that will contain the exported data. Second, you use the panel to create and submit JCL that loads data into the tables.

    You only need to define the DB2 tables, database and storage group once. If these are already defined, go to step 10.

    Tip: Start of changeYou can change the default DB2 settings from the CICS PA Profile Options Menu or the Options action bar menu.End of change
  5. If the DB2 table has not already been created, select the option Create DDL to define table and press Enter.

    The options displayed in the panel depend on whether the HDB is a Performance HDB or a Statistics HDB

       File  Options  Help 
     ──────────────────────────────────────────────────────────────────────────────
                            Export HDB Data Set - Create DDL 
     Command ===>                                                                  
    
     Specify Create options then press Enter.
    
     HDB Name  . . . : EXPLORE5 
     Data Set Name . : USER.EXPLORE5.D12339.T140224.HDB              
    
     Create Options
     /  Create Database                     
     /  Create Storage Group                
    
     Include Clock Field Components          Summary Options
     1  1. Time and Count                    /  Include Sums of Squares
        2. Time only                        
        3. Count only                       
     
  6. If the database or storage group that you want to export to do not yet exist, select the options to create those, and press Enter.

    For a Performance HDB, ensure that Include Clock Field Components is set to 1 (Time and Count), and Include Sums of Squares is not selected (blank).

  7. Press Enter, and then press Enter again to create the JCL.

    An edit panel appears, containing JCL to create the required DB2 tables.

    What DB2 tables will this define?

    Start of changeFor a performance Start of changelistEnd of change HDB, CICS PA defines a DB2 table with the following name:
    qualifier.CPA_CMFPLST
    End of change
    For a performance list HDB that includes an alert definition, an additional DB2 table is created with the following name:Start of change
    qualifier.CPA_CMFALERT
    End of change
    For a performance Start of changesummaryEnd of change HDB, CICS PA defines a DB2 table with the following name:
    qualifier.CPA_CMFPSUM
    For a statistics HDB, CICS PA defines one DB2 table for each STID, with the following name:
    qualifier.CPA_stid

    For a performance HDB, the generated JCL includes a step to create a DB2 view for use by the CICS PA plug-in.

  8. Enter sub to submit the JCL, and then press the Exit key (F3) to return to the CICS PA panel.
  9. Check the SYSPRINT file in the job output queue, to confirm that the tables were successfully defined.
  10. In the CICS PA panel, select the option Load data into table.

    For a Performance HDB, ensure that Include Clock Field Components is set to 1 (Time and Count), and Include Sums of Squares is not selected (blank).

    The JCL to perform the load appears in an edit panel.

  11. Enter sub on the command line to submit the job, and then press the Exit key (F3) to return to the CICS PA panel.