Maintaining Subscription Definitions

#### Search Results

Search

# Maintaining Subscription Definitions

A subscription definition defines a set of rules to be applied to replicated data. Subscription definitions include at least one SFILE definition and at least one destination definition. They may also specify a resend buffer definition to expedite the retransmission of a transaction.

At least one subscription definition, with its associated destination and SFILE definitions, must be created because these definitions are used to determine how replicated data is processed by the Event Replicator Server. If a subscription definition is not specified, data replication will occur, but the data will never be processed by the Event Replicator Server and, therefore, will never be delivered to the target application.

This document covers the following topics:

- Listing Subscription Definitions

- Adding Subscription Definitions

- Modifying Subscription Definitions

- Copying Subscription Definitions

- Activating and Deactivating Subscription Definitions

- Deleting Subscription Definitions

## Listing Subscription Definitions

To use the Adabas Event Replicator Subsystem to list the subscription definitions stored in the Replicator system file:

- Select option S from the Adabas Event Replicator Subsystem Main Menu.

  The Available Subscriptions screen appears showing all of the subscription definitions in the Adabas Event Replicator Subsystem.

      18:32:30      ***** A D A B A S  EVENT REPLICATOR SUBSYSTEM *****    2013-02-28
                                  Available Subscriptions                  M-RP1400

                     Sel  Name      Ver   Description
                     ---  --------  ---   ---------------------------------
                      _   SI040155  OC    INITIAL STATE 040 155
                      _   SI042060  OC    INITIAL STATE 042 060
                      _   SI042200  OC    INITIAL STATE 042 200
                      _   SI046088  OC    INITIAL STATE 046 088
                      _   SI062026  OC    INITIAL STATE 062 026
                      _   SI062029  OC    INITIAL STATE 062 029
                      _   SI062035  OC    INITIAL STATE 062 035
                      _   SI062055  OC    INITIAL STATE 062 055
                      _   SI062079  OC    INITIAL STATE 062 079
                      _   SI062106  OC    INITIAL STATE 062 106
                      _   SI062143  OC    INITIAL STATE 062 143
                      _   SI064121  OC    INITIAL STATE 064 121

      Command ==>
      Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
            Help  Repos Exit  Add                -     +                      Menu

The function keys on this screen perform the following functions:

Function Key | Description
--- | ---
PF1/F1 (Help) | Provides you with help for this screen.
PF2/F2 (Repos) | Provides you with a pop-up panel that allows you to specify the name of the definition you want to locate in the list. Once you have specified a name on the pop-up panel and pressed Enter, the list is repositioned so the name you selected appears first. You can use an asterisk as a wild card character at the end of the definition name or partial definition name you specify on the pop-up panel. Or, you can simply enter the first few characters of the name to reposition the list to the first occurrence in the list of a name starting with those characters.
PF3/F3 (Exit) | Returns you to the previous screen.
PF4/F4 (Add) | Allows you to add a new definition. A new screen appears.
PF7/F7 (-) | Allows you to scroll backwards through the list of definitions.
PF8/F8 (+) | Allows you to scroll forwards through the list of definitions.
PF12/F12 (Menu) | Returns you to the main menu.

## Adding Subscription Definitions

To use the Adabas Event Replicator Subsystem to add a subscription definition in the Replicator system file, complete the following steps:

- Step 1. Access the Subscription Definition Area of the Adabas Event Replicator Subsystem

- Step 2. Supply General Subscription Information

- Step 3. Specify One or More Destinations for the Subscription

- Step 4. Specify One or More SFILE Definitions for the Subscription

- Step 5. (Optional) Modify the Transaction Logging Values for the Subscription, as Necessary

- Step 6. Save the Subscription Definition

### Step 1. Access the Subscription Definition Area of the Adabas Event Replicator Subsystem

To access the subscription definition are of the Adabas Event Replicator Subsystem:

1. Select option S from the Adabas Event Replicator Subsystem Main Menu.

   The Available Subscriptions screen appears showing all of the subscription definitions in the Adabas Event Replicator Subsystem.

       18:32:30      ***** A D A B A S  EVENT REPLICATOR SUBSYSTEM *****    2013-02-28
                                   Available Subscriptions                  M-RP1400

                      Sel  Name      Ver   Description
                      ---  --------  ---   ---------------------------------
                       _   SI040155  OC    INITIAL STATE 040 155
                       _   SI042060  OC    INITIAL STATE 042 060
                       _   SI042200  OC    INITIAL STATE 042 200
                       _   SI046088  OC    INITIAL STATE 046 088
                       _   SI062026  OC    INITIAL STATE 062 026
                       _   SI062029  OC    INITIAL STATE 062 029
                       _   SI062035  OC    INITIAL STATE 062 035
                       _   SI062055  OC    INITIAL STATE 062 055
                       _   SI062079  OC    INITIAL STATE 062 079
                       _   SI062106  OC    INITIAL STATE 062 106
                       _   SI062143  OC    INITIAL STATE 062 143
                       _   SI064121  OC    INITIAL STATE 064 121

       Command ==>
       Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
             Help  Repos Exit  Add                -     +                      Menu

2. Press PF4 on the Available Subscriptions screen.

   The Subscription Definition screen appears showing all of the subscription definitions in the Adabas Event Replicator Subsystem.

   Note
   The list of incomplete items on this screen identifies information (definitions) that must be supplied for the subscription definition before it can be read at Event Replicator Server startup. In the example below, the new subscription definition still needs the following information before it is a valid subscription: at least one destination definition, at least one SFILE definition (File-Related Parms), and format buffer specifications (either as individual format buffers or using global format buffer (GFB) definitions).

       18:33:00      ***** A D A B A S  EVENT REPLICATOR SUBSYSTEM *****    2013-02-28
                                  Subscription Definition                   M-RP1410

       Description .................. ________________________________

       Subscription Name ............. ________               TLOG Values
       User Data Alpha Key ........... ___0                 ------------------------
       Architecture Key .............. ___2                 Input Level .......... 0
       Subscription Version .......... __                   Filter Level ......... 0
       User Data Wide Key ............ ___0                 Output Level ......... 0
       Resend Buffer Name ............ ________             Filter Matched ....... 0
                                                            Filter Not Matched ... 0
       Destination Name List ......... _                    Filter Ignored ....... 0
       File-related Parameters ....... _
                                                            Incomplete Item(s)
       Subscription Active ........... Y                    ------------------
       Deactivate if file deactivated  Y                    Destination
       Increment Initial State Count   N                    File-Related Parms
                                                            Format Buffer

       Command ==>
       Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
             Help        Exit        Save                                      Menu

### Step 2. Supply General Subscription Information

To supply general information for the subscription definition:

- Supply values for the following fields:

  Parameter Name | Specify | Default
  --- | --- | ---
  Description | A description of the subscription. While required by the Adabas Event Replicator Subsystem, this information is for your reference only; it is not used by the Event Replicator Server. | ----
  Subscription Name | A unique name for the subscription. Subscription names must be between one and eight characters long and are required. This is the equivalent of specifying the SUBSCRIPTION NAME parameter directly in the Event Replicator Server startup job. | ---
  User Data Alpha Key | An appropriate output-alpha code if the Event Replicator Server has been started with Universal Encoding Support (UES) enabled. If UES has not been enabled, leave this field blank or set to zero (0). A value of zero means that no UES translation will be done. This is an optional field. This is the equivalent of specifying the SACODE parameter directly in the Event Replicator Server startup job. XML data sent to Event Replicator Target Adapter is in EBCDIC character encoding. EBCDIC values for alphanumeric characters X’40’ thru X’FF’ are sent unchanged. EBCDIC values for alphanumeric fields under X’40’ are translated to spaces. However, support for UTF-8 encoding is available for internationalization purposes. To send XML messages to Event Replicator Target Adapter using UTF-8 format, make sure that this parameter is set to "4091" in the Event Replicator subscription definition used for Event Replicator Target Adapter processing. Note If you want to use UTF-8 character encoding (i.e. SACODE=4091), you must verify that your field lengths are increased as required to accommodate UTF-8 character encoding. The Adabas UES code pages 37, 424, 813, 912, 915, 920, 922, 923, 1006, 1112, 1140, 1256, and 4091 can be specified in the SACODE parameter for Event Replicator Target Adapter. | 0
  Architecture Key | An appropriate architecture key if the Event Replicator Server has been started with Universal Encoding Support (UES) enabled. If UES has not been enabled, leave this field set to "2". This is an optional field. The architecture key is an integer that is calculated as the sum of the following numbers (this is the same as is documented in the record buffer section of the OP command in the Adabas Command Reference Guide): byte order: 0 (high-order byte first) or 1 (low-order byte first) encoding family: 0 (ASCII) or 2 (EBCDIC) floating point format: 0 (IBM370), 4 (VAX), or 8 (IEEE). This is the equivalent of specifying the SARC parameter directly in the Event Replicator Server startup job. Note If you want to transfer replicated and initial-state data to a relational database using the Event Replicator Target Adapter ( the Destination Class, or DCLASS parameter, is set to "SAGTARG"), set the SARC parameter to "2" -- regardless of the location of your relational database. | 2
  Subscription Version | A subscription version. Up to two characters can be specified. This is the equivalent of specifying the SVERSION parameter directly in the Event Replicator Server startup job. This field has no meaning to the Event Replicator Server -- it is optional. But it may be useful for the target application when handling changes in the subscription definition. It is passed as part of the header information sent to the target. | ---
  User Data Wide Key | An appropriate output-wide code if the Event Replicator Server has been started with Universal Encoding Support (UES) enabled. If UES has not been enabled, leave this field blank. This field is optional. This is the equivalent of specifying the SWCODE parameter directly in the Event Replicator Server startup job. Wide-character fields sent to Event Replicator Target Adapter are translated to hexadecimal. However, support for UTF-8 encoding is available for internationalization purposes. To send wide-character fields to Event Replicator Target Adapter using UTF-8 format, make sure that this parameter is set to "4091" in the Event Replicator subscription definition used for Event Replicator Target Adapter processing. | ---
  Resend Buffer Name | The name of the resend buffer to be associated with the subscription, if any. This field is optional. For more information about resend buffer definitions, read Maintaining Resend Buffer Definitions. This is the equivalent of specifying the SRESENDBUFFER parameter in the Event Replicator Server startup job. | ---
  Subscription Active | Whether or not this subscription definition should be activated for use once it is loaded by the Event Replicator Server. Valid values are Y (load and activate the definition) or N (load, but do not activate the definition). This field is optional. This is the equivalent of specifying the SACTIVE parameter in the Event Replicator Server startup job. | Y
  Deactivate if file deactivated | Whether or not this subscription definition should be deactivated if one of its files is deactivated. Valid values are "Y" (deactivate the subscription) or "N" (do not deactivate the subscription). This is the equivalent of specifying the SDEACTIVATE parameter in the Event Replicator Server startup job. While this is an optional feature, we recommend that you use the default or specify "Y" to ensure that the integrity of your replicated data is maintained when a file becomes deactivated. If the subscription is deactivated because one of its files is deactivated, any other files referenced by this subscription are also deactivated unless they are also referenced by another active subscription. If replication for this file in the subscription is unrelated to the replication for other files in the same subscription, the integrity of the replicated data may not be at risk. In this case, a value of "N" might be specified. | Y
  Increment Initial State Count | Whether or not the transaction sequence number should be incremented if an initial-state request is occurring. Valid values are 'Y' (increment the transaction sequence number) or 'N' (do not increment the transaction sequence number). This field is optional. This is the equivalent of specifying the SINCREMENTIS parameter directly in the Event Replicator Server startup job. | N

### Step 3. Specify One or More Destinations for the Subscription

Specify an "S" in the Destination Name List field to specify destination definitions for the subscription. When you enter an "S", a pop-up menu will appear prompting you to save the subscription, and then the Destination List screen appears listing the destination definitions currently assigned to the subscription definition. At least one destination definition must be specified on this screen:

- Use the Name fields on the Destination List screen to specify the name of a predefined destination definition. For more information about destination definitions, read Maintaining Destination Definitions.

  Notes:

  1. You can use PF6 to pick a destination from a list of your previously-defined destination definitions.
  2. An Adabas destination can be referenced by no more than one subscription.

- Once you have specified a destination definition name, use the N and I columns to indicate whether you want the destination to receive normal (N) data or initial-state (I) replicated data. Valid values for these columns are "Y" (receive the data) or "N" (do not receive the data). If you leave these blank, the default for both is "Y".

  Note
  Only initial-state (I) replicated data is valid for subscriptions that use an Optimized Global Format Buffer, therefore Column (N) for normal data should be set to a value of "N".

- Press PF5 to save your destination list when it is finished. Then press PF3 to return to the Subscription Definition screen.

### Step 4. Specify One or More SFILE Definitions for the Subscription

Specify an "S" in the File-related Parameters field to create the SFILE definitions for the subscription. When you enter an "S", a pop-up menu will appear prompting you to save the subscription, and then the List of Subscription SFILEs screen appears listing the SFILE definitions currently assigned to the subscription definition. At least one SFILE definition must be specified on the List of Subscription SFILEs screen:

- If the SFILE definition you want included in the subscription is not listed, press PF4 to add one. If you want to alter an SFILE definition in this list, enter an "S" in the Sel column next to the SFILE definition. For more information about maintaining SFILE definitions, read Maintaining SFILE Definitions.

- Once all of the SFILE definitions you want included in this subscription are listed on the List of Subscription SFILEs, press PF3 to return to rest of the subscription definition.

### Step 5. (Optional) Modify the Transaction Logging Values for the Subscription, as Necessary

To modify the TLOG values for the subscription:

- Optionally, modify the following transaction logging (TLOG) fields on the Subscription Definition screen.

  Parameter Name | Specify | Default
  --- | --- | ---
  Input Level | The transaction logging level when a transaction is selected for subscription processing. Valid values are "0" (no logging), "1" (log event and input transaction data), "2" (log event, input transaction, and file/record data), or "3" (log event and all available input transaction data for the event). This is the equivalent of specifying the STLINPUT parameter in the Event Replicator Server startup job. | 0
  Filter Level | The transaction logging level when a record in a transaction is being excluded from replication due to extended subscription processing or the subscription user exit. Valid values are "0" (no logging), "1" (log event, filter reason, and transaction information), "2" (log event, filter reason, transaction, and file/record information), or "3" (log event, filter reason, transaction information, file/record information, and payload data of available images). This is the equivalent of specifying the STLFILTER parameter in the Event Replicator Server startup job. | 0
  Output Level | The transaction logging level when a transaction is to be output on behalf of a subscription. Valid values are "0" (no logging), "1" (log event and output transaction data), "2" (log event, output transaction, and file/record data), or "3" (log event and all available output information for the event). This is the equivalent of specifying the STLOUTPUT parameter in the Event Replicator Server startup job. | 0
  Filter Matched | The transaction logging level when a filter condition is true. Valid values are "0" (no logging), "1" (log event and filter information), or "2" (log event, filter information, and payload data or available field values). This is the equivalent of specifying the STLMATCH parameter in the Event Replicator Server startup job. | 0
  Filter Not Matched | The transaction logging level when a filter condition is false. Valid values are "0" (no logging), "1" (log event and filter information), or "2" (log event, filter information, and payload data or available field values). This is the equivalent of specifying the STLNOMATCH parameter in the Event Replicator Server startup job. | 0
  Filter Ignored | The transaction logging level when a filter condition cannot be evaluated. Valid values are "0" (no logging), "1" (log event and filter information), or "2" (log event, filter information, and payload data or available field values). This is the equivalent of specifying the STLIGNORE parameter in the Event Replicator Server startup job. | 0

### Step 6. Save the Subscription Definition

To save the subscription definition:

- Press PF5 to save the subscription definition in the Replicator system file.

## Modifying Subscription Definitions

To use the Adabas Event Replicator Subsystem to modify a subscription definition in the Replicator system file:

1. Select option S from the Adabas Event Replicator Subsystem Main Menu.

   The Available Subscriptions screen appears showing all of the subscription definitions in the Adabas Event Replicator Subsystem.

2. Locate the definition you want to modify on the screen and enter an M in the Sel column for that definition.

   You can locate the definition you want in the list by pressing the PF7 (F7) or PF8 (F8) keys to scroll through the list. You can also press PF2 (F2) to specify the name of the definition to which the list should be repositioned.

   You are prompted to select the version of the subscription definition containing the SFILE definitions. The following is a sample pop-up menu from which you can select the version.

        Please Choose Version

          Code  Version
          ----  ------------
           C    Current
           S    Scheduled
          ----  ------------

          Code ... _

3. Select the version by entering the appropriate code in the Code field.

   The Subscription Definition screen appears listing the details of the Adabas subscription. For information on modifying this screen, read the description of Adding Subscription Definitions.

4. When all modifications have been made, press PF5 to save the changes.

   You are prompted to indicate which version of the subscription the changes should be saved to. The following is a sample pop-up menu from which you can select the version.

                  Please Choose Save Option

          Code      Description
          ----  -------------------------------------
           A    Replace Current
           B    Save as Current (Current becomes Old)
           C    Replace Scheduled
           D    Save as Scheduled (Scheduled become Current)
          ----  --------------------------------------------

          Code ... _

5. Select the version by entering the appropriate code in the Code field.

   The subscription modification is complete.

## Copying Subscription Definitions

To use the Adabas Event Replicator Subsystem to copy a subscription definition in the Replicator system file:

1. List the subscription definitions in the Adabas Event Replicator Subsystem, as described in Listing Subscription Definitions.

   The subscription definitions are listed on the Available Subscriptions screen.

2. Locate the definition you want to copy on the screen and enter a C in the Sel column for that definition.

   You can locate the definition you want in the list by pressing the PF7 (F7) or PF8 (F8) keys to scroll through the list. You can also press PF2 (F2) to specify the name of the definition to which the list should be repositioned.

   A dialog appears requesting a name for the copy of the subscription definition.

        Enter new name: ________
        or press PF3 to cancel

3. Specify a new, unique name for the copy of the subscription definition and press Enter.

   The subscription definition is copied and the copy appears on the Available Subscriptions screen.

## Activating and Deactivating Subscription Definitions

You can use Adabas Online System (AOS) to activate and deactivate subscription definitions. For more information, read Activating and Deactivating Replication Definitions and Databases

| Warning: Be careful when you activate and deactivate replication definitions and databases, especially if replication is ongoing at the time. Whenever you activate or deactivate definitions or databases, you run the risk of altering what data is replicated and how that replication occurs. If the Event Replicator Server receives data from an Adabas database for which it has no active definitions, replication simply does not occur.

## Deleting Subscription Definitions

To use the Adabas Event Replicator Subsystem to delete a subscription definition in the Replicator system file:

1. List the subscription definitions in the Adabas Event Replicator Subsystem, as described in Listing Subscription Definitions.

   The subscription definitions are listed on the Available Subscriptions screen.

2. Locate the definition you want to delete on the screen and enter a D in the Sel column for that definition.

   You can locate the definition you want in the list by pressing the PF7 (F7) or PF8 (F8) keys to scroll through the list. You can also press PF2 (F2) to specify the name of the definition to which the list should be repositioned.

   The subscription definition is deleted.

### On this page

- Listing Subscription Definitions
- Adding Subscription Definitions
- Modifying Subscription Definitions
- Copying Subscription Definitions
- Activating and Deactivating Subscription Definitions
- Deleting Subscription Definitions