Perform the following steps to run the samples:

1. Enable the DB2 instance as described in the
   IM Modeling Administration and Programming guide
   in chapter Quick Start / Configuration
2. Create a database
     db2 create database <DBNAME>
3. Enable the database for the use of IM Modeling
   (idmenabledb can be found in the bin directory of your installation):
     idmenabledb <DBNAME> fenced dbcfg
4. Connect to the database:
     db2 connect to <DBNAME>
     
To run the clustering samples (customer segmentation):
   a) Create the sample table BANKCUSTOMERS containing sample data:
      db2 -stf bankingImport.db2
   b) Create a DM_ClusBldTask value and start a clustering training run:
      db2 -stf bankingClusTrain.db2
      The created model BankCustomerSegments is stored in the table
      IDMMX.ClusterModels. This model can be viewed using IM Visualization.
   c) Extract information from the clustering model.
      db2 -stf bankingClusTrainResult.db2
   d) Create DM_MiningData values and insert them into a table:
      db2 -stf bankingCreateMiningData.db2
   e) Create DM_ClusSettings values and insert them into a table:
      db2 -stf bankingCreateSettings.db2
   f) Create DM_ClusBldTask values and insert them into a table:
      db2 -stf bankingCreateTask.db2
   g) Start clustering mining training runs:
      db2 -stf bankingRunTask.db2
      The two created models BankingClusAliasModel and BankingClusGenericModel
      are stored in the table IDMMX.ClusterModels. These models can be viewed
      using IM Visualization.
   h) If you want to run the clustering sample again delete all created values
      from the sample tables:
      db2 -tf bankingDelete.db2
      
To run the classification samples (predict heart disease):
   a) Create the sample table HEART containing sample data:
      db2 -stf heartImport.db2
   b) Create a DM_ClasBldTask value and start a classification training run:
      db2 -stf heartClasTrain.db2
      The created model HeartClasModel is stored in the table
      IDMMX.ClassifModels. This model can be viewed using IM Visualization.
   c) Extract information from the classification model.
      db2 -stf heartClasTrainResult.db2
   d) Create a DM_ClasTestTask value and start a classification test run:
      db2 -stf heartClasTest.db2
      The created test result HeartClasTestResult is stored in the table
      IDMMX.ClasTestResults. This model can be viewed using IM Visualization.
   e) Extract information from the created classification test result:
      db2 -stf heartClasTestResult.db2
   f) If you want to run the classification sample again delete all created 
      values from the sample tables:
      db2 -tf heartDelete.db2
      
To run the regression samples (predict insurance claims):
   a) Create the sample table INSURANCE containing sample data:
      db2 -stf insurImport.db2
   b) Create a DM_RegBldTask value and start a regression training run:
      db2 -stf insurRegTrain.db2
      The created model InsuranceModel is stored in the table
      IDMMX.RegressionModels. This model can be viewed using IM Visualization.
   c) Extract information from the regression model.
      db2 -stf insurRegTrainResult.db2
   d) Create a DM_RegTestTask value and start a regression test run:
      db2 -stf insurRegTest.db2
      The created test result InsuranceTestResult is stored in the table
      IDMMX.RegTestResults. This model can be viewed using IM Visualization.
   e) Extract information from the created regression test result:
      db2 -stf insurRegTestResult.db2
   f) If you want to run the regression sample again delete all created values
      from the sample tables:
      db2 -tf insurDelete.db2
      
To run the associations samples (market basket analysis):
   a) Create the sample tables RETAIL and RETAIL_NAMES containing sample data:
      db2 -stf retailImport.db2
   b) Create a DM_RuleBldTask value and start an associations training run:
      db2 -stf retailRuleTrain.db2
      The created model RetailRuleModel is stored in the table
      IDMMX.RuleModels. This model can be viewed using IM Visualization.
   c) Extract rules from the associations model.
      db2 -stf retailRuleTrainResult.db2
   f) If you want to run the associations sample again delete all created 
      values from the sample tables:
      db2 -tf retailDelete.db2

To create additional error and progress tables:
   a) Modify table,schema and index names in the following scripts:
       createErrorTable.db2
       createProgressTable.db2
   b) Create an additional error table       
       db2 -stf createErrorTable.db2
   c) Create an additional progress table    
       db2 -stf createProgressTable.db2
