IBS Enterprise Help Centre 8.0Business Suite 2014/2015

Setting up BCF replication

This document describes how to set up IBS Business Connector Framework (BCF) Replication to be able to replicate data from/to all relevant physical files. This application can also replicate physical files that are not part of IBS Enterprise.

When the setup is complete the target files can be used in the IBS BCF Replication application(s).

Requirements

IBS Enterprise must be installed with a minimum installation of the following applications: DBF, GEN, SYS and BIR.

The following must be done to be able to replicate:

  • Decide the physical files that you plan to replicate.
  • Decide a target library in the eServer iSeries/400 (commonly known as AS/400) where you want the replicated data to be stored for later use by IBS BCF Replication application(s). This can be done on company level.
  • Add the database triggers for events INSERT, UPDATE and DELETE to the relevant physical files.

Click to expand each section.

Add replication set and associated files

  1. Activate application IBS BCF Replication if not already done in Work with companies. Note: You only have to do this in one company.
  2. Select the Work with BCF Replication sets menu item.
  3. You access Work with BCF Replication sets. Click Add to enter a new Replication set.
  4. On the detail panel, complete the following fields:
  5. Replication set name
    Description
    Source library
    Enter the library from where you are replicating data. The entered library name will be validated.
    Target library
    Enter the library to where you want the data replicated.
    IBS system library
    Optional entry. Enter the IBS system library if the source library is an IBS database library. This will allow you to select from the available IBS Enterprise files that exist in the IBS Enterprise database library when you are adding your files for replication.
    Program prefix
    Use this field if you have files which have the same name if you remove the file prefix e.g. SRO/ANO/WHO etc. The reason is that duplicate trigger programs are not allowed and that trigger program name is created as follows: Program prefix + trigger type + file name (excluding 3 first characters). The default is BI (normally used for SRO* files).
    Subset
    Enter the subset on which this replication set should belong. Replication sets with subset *STDDELTA and *STANDARD are supplied by IBS.
    Identity
    Optional entry. Enter the identity for this replication set.
    PTF/Mod number
    Optional entry. Enter the PTF/Mod number when this replication set was created/changed.

    Click OK.

  6. You return to the initial panel. Select the replication set you created and click Files.
  7. You access Work with BCF Replication sets, Files. Click Add to add the files that you want to replicate.
  8. On the detail panel, complete the following fields:
  9. Source file
    Enter the file from where you are replicating data. If you entered the IBS system library when creating the replication set, you will access all available IBS Enterprise files when pressing F4 or clicking the prompt icon to select from available files. If you did not complete the IBS system library field (i.e. you are replicating from a system other than IBS Enterprise) you will access the Work with objects panel. On that panel you must check which files are possible to use and then manually add the file(s) in this field.
    Target file
    Enter the file to where data is being replicated. This file does not have to exist - it will automatically be created when you create triggers.

    Select the trigger events that you want to have on this file choosing from the following:

    Trigger INSERT
    Indicate if replication should be done when adding new records.
    Trigger UPDATE
    Indicate if replication should be done when records are changed.
    Trigger DELETE
    Indicate if replication should be done when records are deleted.

    Click OK. Repeat the add file instructions for all applicable files that you want to replicate.

Company code in the target files

Optionally, you can also set up companies within a replication if you want the company code in the target files. Do as follows:

  1. Access the Work with BCF Replication sets main panel and click Companies.
  2. You access Work with BCF Replication sets, Companies. Click Add to add the companies that you want to replicate.
  3. On the detail panel, complete the following fields:
  4. Company
    Description
    Source library
    Enter the library from where you are replicating data. The entered library name will be validated. This value will override the source library on replication set level.
    Target library
    Enter the library to where you want the data replicated. This value will override the target library on replication set level.
    IBS system library
    Optional entry. Enter the IBS system library if the source library is an IBS database library. This will allow you to select from the available IBS Enterprise files that exist in the IBS Enterprise database library when you are adding your files for replication.

    Click OK.

Options

Run initial load

Initial load does the following:

  • Creates the target library.
  • Creates the target files.
  • Creates the trigger programs (there is one trigger program for each trigger event).
  • Adds the trigger events (INSERT, UPDATE and/or DELETE) to the source file.
  • Loads the target files with all data from the source file.

Note: If you do not want to load the target file with the source file an alternative to running Initial load is to run Create triggers. This does everything as mentioned above except load the target files.

Initial load can be done on the following levels:

  • Replication set: Will be done for all files within the replication set.
  • Companies: Will be done for all files within the replication set and will also create the company code in the target files.
  • Files: Do it on this level if you, e.g., have previously run it on Replication set, but discover that you want one more file. This will allow you to just run it for the relevant file.

    Caution: Initial load on Replication set or File level will NOT create the company code in the target files.

The Initial load option can only be run when the files are not locked. To check if any of the files are locked, you can do this on the following two levels:

  1. Initial load on the initial panel for the Replication set. If Locked files is set to YES you cannot run it. You have to drill down to file level to check which files are locked.
  2. Initial load directly on File level.

    Note: Take the necessary steps to unlock the file.

To run the initial load, select the Initial load option from the applicable level. Indicate when the update should take place and click OK.

Delete triggers

Delete triggers can be done as follows:

  • Delete triggers: On replication set, company or file level.
  • Delete: On replication set, company or file level.

Both of these options do the following:

  • Delete the trigger events (INSERT, UPDATE and/or DELETE) on the source file.
  • Delete the trigger programs (there is one trigger program for each trigger event).

Note: It does not clear or delete the target file(s). This has to be done manually.

Caution: In order to find the correct trigger event and trigger program to delete, it uses the program prefix on the Replication set, this means that you must NOT change the program prefix between having created triggers for a file and deleting triggers for that file.