Advanced Options

This document is organized as follows:


Renaming Subtables

The Event Replicator Target Adapter Data Mapping Tool already allowed users to rename the base schema main table and subtables. There was a restriction regarding what new subtable names are allowed.

This restriction no longer applies and users can freely rename subtables to any string value. The new name does not require any schema prefix. This feature is particularly useful when mapping Adabas data to relational targets where tables already exist, and where those tables may not conform to how the Event Replicator Target Adapter creates tables.

Example

  • Schema and base table name are "EMPLOYEES". All PE/MU subtables can have any string value:

    • "FOOMU" for MU field ADDRESS-LINE

    • "FOOPE" for PE group INCOME

    • "FOOMUPE" for MU BONUS in PE INCOME

Renaming MU/PE Index Fields

In earlier versions, the Event Replicator Target Adapter Data Mapping Tool did not allow users to rename any MU or PE or MU in PE index columns.

This restriction no longer applies and users can freely rename MU/PE index field names to any string value. The new name can be completely unrelated to the schema prefix or table name. Examples:

  • "FOOMUIX" for MU ADDRESS-LINE line index field

  • "FOOPEIX" for PE group INCOME

  • "FOOMUPEIX" for MU BONUS in PE INCOME

Suppressing PE Table Pseudo Compound/Composite Primary Key Columns

The Event Replicator Target Adapter Data Mapping Tool is meant to provide visualizations for the processing done by the Event Replicator Target Adapter. It shows a mapping of mainframe Adabas files and fields to target RDBMS tables and columns. With MU/PE fields, this is especially important because mainframe fields with multiple values per record will by default map to multiple tables and rows on a target RDBMS.

When the Event Replicator Target Adapter processes PE groups, by default it will create a separate subtable for all fields in the PE group. It will also create an additional pseudo compound/composite primary key column in the target table containing a combination of the ISN from the base table and the index/occurrence value for the PE group. An example of this for EMPLOYEES PE group LEAVE-BOOKED would be column "ISN_LEAVE-BOOKED_INDEX". The Event Replicator Target Adapter Data Mapping Tool will show this primary key column in the GFB schema so users understand and can see what will happen in the target RDBMS.

In earlier versions of Event Replicator Target Adapter Data Mapping Tool, users could not change this processing in Event Replicator Target Adapter. So when doing a right click context menu on this primary key column, the only context menu action available was Properties. This restriction no longer applies. Users will see a new context menu item Remove Primary Key. This action allows users to suppress the creation of this pseudo compound/composite primary key column. This action is always available for PE groups that do not contain any MU fields. If the PE group contains any MU fields, this action will only be enabled after the user performs the Split Foreign Key Index action on all the MU fields in the PE group.

Renaming Base Table ISN

By default Event Replicator Target Adapter creates an additional ISN column in the base table and makes it the primary key. This ISN column then becomes a foreign key in all the MU/PE subtables, in order to connect the subtable rows to the associated base table row.

In earlier versions of Event Replicator Target Adapter Data Mapping Tool, users could not change the name of this ISN column. Users could choose to use a different column for the primary key, or even multiple columns to form a compound/composite primary key. But when users chose to keep the ISN column as the primary key, they could not change the ISN column name.

This restriction no longer applies. Users can now change the name of this ISN column in the base table. When doing a right click context menu on this ISN column in the base table, users will now see a Rename action. The new name can be any string value. When this action completes, the new column name will ripple through all the MU/PE subtables, changing the ISN foreign key column name to match the new base table ISN primary key column name.

Saving the Replacements File

The mechanism used to communicate all of these advanced options to Event Replicator Target Adapter is via a special text file containing various directives. By default this file is named replacements.txt.

The Event Replicator Target Adapter Data Mapping Tool will determine whether any advanced options have been used that require the use of a replacements file. If a replacement file is needed, an extra button named Save Replacements File will appear on the Generate GFB/GFFT dialog. An example using EMPLOYEES is shown below.

graphics/advopt_replacefiles.png

Clicking on the Save Replacements File button opens a file save dialog appropriate for the operating system. The default file name will be replacements.txt.

The Event Replicator Target Adapter will by default look for the existence of a file of this name at <install_root>\EventReplicatorTargetAdapter\art\data on Windows and <install_root>/EventReplicatorTargetAdapter/art/TargetAdapter on UNIX/Linux. If the file exists, it will be used in processing replicated data.

We recommend keeping and saving your generated file as replacements.txt at this default location. However if the user prefers saving the file as a different name or to a different location, the environment variable ART_REPLACEMENTS_FILE for the Event Replicator Target Adapter environment must be set. A convenient place to set this environment variable is in the Event Replicator Target Adapter installation script installArtPath.bat or installArtPath.sh respectively, by adding a setting to the environment variable, e.g. for Windows:

set ART_REPLACEMENTS_FILE=<full path to file>