Example - Procedure details

  1. Create target companies 600, 601, 602 and 603.

    Create the target companies 600, 601, 602 and 603 through the Companies (ttaad1100m000) session. Convert the changes to runtime and restart your bshell.

  2. Define logical tables for companies 601, 602 and 603.

    Note: 

    In the source environment, companies 401, 402 and 403 contain logical tables that are all linked to physical tables in company 400. Company 400 does not contain logical tables.

    Update the actual table sharing to define the logical tables for the new companies 601, 602, and 603. This is done by copying the actual table sharing set to a new version and adding the relations in the Tables by Table Set (tltsm1110m000) session where company 600 is the physical company and 601, 602, and 603 are the logical companies. For each table set, you must specify a line for each logical company.

    If not present, you must generate an actual table sharing set first. This is done by executing the Import from Logical Tablescommand in the Table Sharing Sets (tltsm1115m009) session as described in Procedure details.

    After updating the table sharing set with the new companies, you must execute the Make Table Sharing Set Actual command to convert the changes to the runtime data dictionary and you must restart your bshell to load the new settings.

    Note: 
    • if a multi company environment is specified on the actual table sharing set, you must add the new companies 600, 601, 602 and 603 to the multi company environment as well.
    • The companies in the new multicompany structure must at least share the tccom000 (Implemented Software Components) and tcemm170 (Companies) tables, and their reference tables.
  3. Export data from source companies 400, 401, 402 and 403.

    Extract data from the source companies 400, 401, 402 and 403 to sequential files. Do not export data from the Enterprise Modeling (tg) package.

    • Company 400

      To extract data for company 400, you must run the Create Sequential Dump of Table (ttaad4226m000) session twice.

      For the first export, use these settings:

      Create Sequential Dump of Table (ttaad4226m000)
      Field Value
      Company 400-400
      Package aa-tf
      Table <empty> - zzz999
      Suppress Error Messages No
      Drop Table after Dump No
      Create Fixed Length Records No
      Specify Field Separator

      Yes

      | (pipe)

      Directory for Table Files /tmp/400
      Basic Name for Dump File(s) <Empty>
      Name of the Error File /tmp/err400-1

      For the second export, use the same settings, except:

      • Range of packages: th-zz
      • Enter a different name for the error file, for example /tmp/err400-2
    • Remaining companies

      Use the same procedure to extract data from the companies 401, 402 and 403.

      Points of attention:

      • Specify a different directory for each company: /tmp/401, /tmp/402 and /tmp/403 for companies 401, 402 and 403 respectively.
      • Enter a different name for the error file for each export.
  4. Correct company numbers

    Run the Copy Company Data (tccom0214m000) session to correct references to company numbers in the sequential files. References to the source companies 400, 401, 402 and 403 must be changed into references to the target companies 600, 601, 602 and 603 respectively.

    • Company 400

      • Switch to company 400
      • Run the session with these settings:
      Copy Company Data (tccom0214m000)
      Field Value
      Specify Field Separator | (pipe)
      Directory for Table Files /tmp/400
      Companies to Copy

      Yes

      400>600;401>601;402>602;403>603

      Enterprise Units to Copy No
    • Remaining companies

      Run the session another 3 times to correct the sequential files of companies 401, 402 and 403.

      Points of attention:

      • Before you run the session you must switch to the appropriate source company number, for example switch to company 401 before you run the session to correct the files that were extracted from company 401.
      • The Directory for Table Files differs per company number: /tmp/401, /tmp/402 and /tmp/403 for the files of companies 401, 402 and 403 respectively.
      • The remaining settings must be exactly identical to the settings in the example above.
  5. Import data into companies 600, 601, 602 and 603.

    Run the Create Table from Sequential Dump (ttaad4227m000) session to import the contents of the sequential files into the target companies.

    • Company 600

      To load data into company 600, use these settings:

      Create Table from Sequential Dump (ttaad4227m000)
      Field Value
      Create Tables for Different Company

      Yes

      600

      Append if Table Exists No
      Delete Existing Tables No
      Create Rows before Index Yes
      Disable Domain Constraints No
      Ignore Referential Integrity Constraints Yes
      Specify Field Separators of Seq File

      Yes

      | (pipe)

      Directory for Searching Table Files /tmp/400
      Pattern to Match Table Names *
      File to Store Table Names not Created No
      Name of the Error File /tmp/err_imp600
    • Remaining companies

      Use the same procedure to import data for the companies 601, 602 and 603.

      Points of attention:

      • The Directory for Searching Table Files is different for each company:
        • /tmp/401 contains the files that must be loaded into company 601
        • /tmp/402 contains the files that must be loaded into company 602
        • /tmp/403 contains the files that must be loaded into company 603
      • Enter a different name for the error file for each import.
  6. Create missing tables for companies 600, 601, 602 and 603.

    Run the Create Tables (ttaad4230m000) session to create missing tables for the companies 600, 601, 602 and 603. Specify these settings:

    Create Tables (ttaad4230m000)
    Field Value
    Company 600 - 603
    Package < Empty> - zz
    Table < Empty> - zzz999
  7. Define company 600 as the central DEM company for all target companies.

    For each target company (600, 601, 602, and 603), repeat these steps:

    • Switch to the new target company.
    • Run the Central Company to store Enterprise Modeler Data (tgbrg0100s000) session. Specify company 600 as the central DEM company.
  8. Run the Reorganize Tables (ttaad4225m000) session to reorganize the tables and to repair the reference counters for the companies 600, 601, 602 and 603.

    Specify these settings:

    Create Table from Sequential Dump (ttaad4227m000)
    Field Value
    Company 600 - 603
    Package < Empty> - zz
    Table < Empty> - zzz999
    Data and Indices Yes
    Reference Integrity Yes
    Check Validity of Reference No
    Repair Reference Counter Yes
    All other check boxes No