Administration Version 2.6.1
 —  Using Event Replicator Administration  —

Maintaining SFILE Definitions

An SFILE definition defines the Adabas file containing the input data to be processed by the subscription. SFILE definitions are included within subscription definitions. They include format buffer specifications for the file data (they can reference GFB definitions instead). SFILE definitions may also specify a transaction filter definition that should be applied to the data in the SFILE file and a subscription user exit that should be used in processing the file data.

At least one SFILE definition is required in a subscription definition for every Event Replicator for Adabas run.

This document covers the following topics:


Listing SFILE Definitions

Start of instruction setTo use Event Replicator Administration to list the SFILE definitions stored in the Replicator system file:

  1. Select an Event Replicator Server in tree-view as described in Selecting Event Replicator Databases.

  2. Click and expand Replication Definitions in tree-view under the selected database.

  3. Click on Subscriptions in the tree-view under Replication Definitions.

    A table listing the subscription definitions in the Replicator system file appears in detail-view.

  4. Click on the subscription definition in detail-view that contains the SFILE definitions you want to list or maintain.

    The subscription definition appears in detail view.

  5. Click the Modify button in detail-view.

    The subscription definition becomes modifiable.

  6. Click on the check mark in the File-Related Parameters field in detail-view.

    The List of Subscription SFILEs table for the subscription appear in detail-view.

    graphics/sfillist.png

Top of page

Adding SFILE Definitions to a Subscription

To add SFILE definitions to a subscription, complete the following steps:

Step 1. Access the SFILE Definition Area for the Subscription

Start of instruction setTo access the subscription definition are of the Event Replicator Administration:

  1. List the SFILE definitions in Event Replicator Administration, as described in Listing SFILE Definitions.

    The SFILE definitions for the subscription (if any) are listed in a List of Subscription SFILEs table in detail-view.

Step 2. Create the New SFILE Definition and Supply General SFILE Definition Information

Start of instruction setTo create the SFILE definition and supply general information for the SFILE definition:

  1. Click the New button in detail-view.

    A blank SFILE screen appears in detail-view.

    graphics/sfile1.png

  2. Supply values for the following general SFILE definition fields on the SFILE panel:

    Parameter Name Specify Default
    Subscription The name of the subscription definition you are editing. You cannot change this field here.  
    DBID (SFDBID) The database ID associated with the input file specified by this SFILE definition. The database ID is numeric and can range from one through 65535. This is a required field. ---
    File Number (SFILE) The number of the input file to be processed by this SFILE definition. This is a required field. ---
    Replicate for Insert (SFREPLICATEINSERT) Whether or not you want records from this Adabas file replicated when they are inserted. Specify "Yes" if you want them replicated or "No" if you do not want them replicated. This is an optional field. Yes
    Replicate for Update (SFREPLICATEUPDATE) Whether or not you want records from this Adabas file replicated when they are updated. Specify "Yes" if you want them replicated or "No" if you do not want them replicated. This is an optional field. Yes
    Include Identical Records (SFREPLICATENOTCHANGED) Whether an update request should be replicated if the after image (AI) is the same as the before image (BI). Valid values are "Yes" or "No". If "Yes" is specified and the before and after images are the same, the record is replicated subject to other field filtering that may be specified for this file. If "No" is specified, and the before and after images are the same, no further processing occurs for the record. Note that the format buffers for the before and after images must be identical. This is an optional field. Yes
    Replicate for Delete (SFREPLICATEDELETE) Whether or not you want records from this Adabas file replicated when they are deleted. Valid values are "Yes", "No", or "Update". This is an optional field; the default is "Yes".

    If this parameter is set to "No" and an input record for the DBID/file is for a delete, the input record will NOT be processed for this subscription.

    If this parameter is set to "Yes" and an input record for the DBID/file is for a delete, the input record will be processed for this subscription.

    If this parameter is set to "Update" and an input record for the DBID/file is for a delete, the before and after images of the input record are passed to your subscription user exit. Therefore, if this parameter is set to "Update", a subscription user exit name must be specified in the Subscription User Exit parameter. In addition, the subscription before and after image format buffers must be identical and no primary key should be defined to the file (to ensure that the before image is a copy of data storage). The purpose of the "Update" value of this parameter is to allow your subscription user exit to process replicated physical delete transactions on your target database as you choose. Your subscription user exit can decide if the physical delete transaction should be: physically deleted from your target database, converted to an update, or ignored and not sent at all. For more information about using the subscription user exit with the "Update" setting of this parameter, read Controlling Delete Transaction Processing (SFREPLICATEDELETE=UPDATE Processing).

    Yes
    Subscription User Exit (SFSEXIT) The name of the subscription user exit you want used (if any) when records from the file specified by this SFILE definition are replicated. This is an optional field.

    For more information about subscription user exits, read Using the Event Replicator Subscription User Exit, in Event Replicator for Adabas Administration and Operations Guide provided with your Event Replicator Administration documentation.

    ---
    Internal Transaction Filter (SFFILTER) The name of the internal transaction filter definition you want used (if any) when records from the file specified by this SFILE definition are replicated. This is an optional field. ---
    Before-Image Format Buffer See the later steps in these instructions. ---
    After-Image Format Buffer See the later steps in these instructions. ---
    Key-Related Before-Image Format Buffer See the later steps in these instructions. ---
    Default Code (SFDEFAULTACODE parameter) A default, at the subscription file level, for the file’s alpha character encoding. The encoding must belong to the EBCDIC encoding family; that is, the space character must be X’40’.’. This can only be set when the Event Replicator Server has been started with Universal Encoding Support (UES) enabled.

    This parameter is meant to be used when all of the following conditions are met:

    • The Event Replicator Server is UES-enabled,

    • The source database is not UES-enabled

    • The subscription definition requests UES translation (i.e. parameter SACODE is specified)

    • The data in the source database file is stored in a code page other than the default alpha encoding.

    At the time a before or after image is decompressed and translated in the Event Replicator Server, the file encoding is taken as follows:

    • from the source FCB;

    • if the encoding is not set above, from the GCB of the source database;

    • if the encoding is not set above, from the value set for this parameter (SFDEFAULTACODE);

    • if the encoding is not set above, from the GCB of the Event Replicator Server.

    Note that if the source database is UES-enabled, the file encoding will be taken from either a or b above.

    none
    Security File(SFSECURITYFILE parameter) Whether or not you want security definitions in the Adabas security file replicated. Valid values are "Yes" or "No", with a default of "No". The setting of this parameter allows you to define a subscription file (SFILE) definition specifically for security definitions in the Adabas security file on the database.

    Notes:

    1. This parameter cannot be set to "Yes" unless you have Adabas 8.2 or later installed.
    2. Adabas Security Facilities, including the Adabas security utility (ADASCR) can be obtained only by special request. If you are interested in Adabas Security Facilities, please contact your Software AG sales representative.

    When this parameter is set to "No", replication of the security definitions does not occur and replication processing proceeds normally.

    When this parameter is set to "Yes", replication of the security definitions in the Adabas security file will occur. However, the following parameter settings are also required:

    • A format buffer may not be specified. This means that no values may be specified for the Before-Image Format Buffer, After-Image Format Buffer, or Key-Related Before-Image Format Buffer parameters.

    • No value may be specified for the Default Code parameter.

    • A transaction filter definition may not be specified. This means that no value may be specified for the Transaction Filter parameter.

    • The default value of Yes must be specified for the Replicate for Insert, Replicate for Update, Include Identical Records, and Replicate for Delete parameters.

    • A subscription exit may not be specified. This means that no value may be specified for the Subscription User Exit parameter.

    • When you set this parameter to "Y", you indicate that the file specified in the File Number parameter is the file number of the security file for the source database identified in the DBID parameter. Therefore, if this parameter is set to "Y" for other subscription SFILE definitions using the same source database (with the same SFILE DBID setting), the same value must be set for each of the File Number parameters in the SFILE definition. In other words, it is invalid for a source database (DBID setting) to have different file numbers specified for the security file in different subscriptions. For example, source database 10 cannot have the security file specified as both file 15 in one SFILE definition and 20 in another SFILE definition.

    • If this parameter is set to "Y" for a source database (DBID parameter), any Adabas destination definitions with same database specified as the destination input database, must also specify identical file numbers for both the input file and target file parameters.

    For complete information about replicating security definitions, read Replicating Security Definitions.

    No
  3. Click OK to save the incomplete SFILE definition.

    The SFILE definition is saved for the subscription and appears in a List of Subscription SFILEs table in detail-view.

Step 3. Specify Format Buffers for the SFILE Definition

In each SFILE definition you create, you must specify a format buffer or a global format buffer (GFB) to be used when decompressing the data storage after image (an after-image format buffer). Format buffers or GFBs do not need to be specified for the before-image or key-related before-image format buffers.

Start of instruction setTo specify one or more SFILE definitions for the subscription:

  1. Modify the settings of the following format buffer parameters, as appropriate for the SFILE definition. For information on defining global format buffers for use in SFILE definitions, read Maintaining GFB Definitions.

    Parameter Name Specify Default
    Before Image Format Buffer Using the drop-down list for this field, select a global format buffer (GFB) definition or select "Format Buffer" to type in a format buffer to be used when decompressing the data storage before image.

    Format buffer specifications must conform to the format buffer rules (for read commands) described in the Adabas command reference documentation.

    PE and MU fields cannot use the range notation 1-N in format buffers for a subscription that is sent to a destination that has specified the replication intialization parameter DCLASS=SAGTARG. The SAGTARG application invoked requires that the range of occurrences specified are contained in the record buffer even if they are empty occurrences. 1-N results in a range of 1-191, but unless there are 191 occurrences containing data, space in the record buffer is not allocated for any empty occurrences, resulting in incorrect field positioning when processing the record.

    If you are using the Event Replicator Target Adapter (if "SAGTARG" is specified as the destination class of some destination used by this subscription), any GFB names you select for the After Image Format Buffer parameter and the Before Image Format Buffer parameter must be the same. In addition, any GFB name you select for the Key-Related Before Image Format Buffer parameter must have been built from a Predict user view with the same name as the user view used to build the before and after images, but with the suffix "-KEY" on the end. (Likewise, if you use the Data Mapping Tool, the SGFORMATKEY GFB should be built from a DDM with the same name as the DDM used to build the before and after image GFBs.) Event Replicator processing strips off the "-KEY" to ensure that any delete is associated with the before and after image file name that was used to build the table(s) in the RDBMS.

    The after image format buffer will be used, if no before image format buffer is specified.
    After Image Format Buffer Using the drop-down list for this field, select a global format buffer definition or select "Format Buffer" to type in a format buffer to be used when decompressing the data storage after image.

    Format buffer specifications must conform to the format buffer rules (for read commands) described in the Adabas command reference documentation.

    If the destination target for replicated data is an Adabas mainframe database running Adabas 8.1.3 or later, you can specify the symbolic notation "C." alone as the After Image Format Buffer value or you can select the name of a GFB definition containing the symbolic notation "C." alone. This notation will cause the Event Replicator Server to replicate the entire source record to the target mainframe Adabas database.

    Caution:
    This "C." option may be used only if the destination target file has been defined with the same fields in the same order as the fields in the source file; if there are differences in the definitions of the files, the replication of the data is likely to incur errors. The only exception to this rule is that the definitions of the descriptors and superdescriptors in the target and source files may be different.

    PE and MU fields cannot use the range notation 1-N in format buffers for a subscription that is sent to a destination that has specified the replication intialization parameter DCLASS=SAGTARG. The SAGTARG application invoked requires that the range of occurrences specified are contained in the record buffer even if they are empty occurrences. 1-N results in a range of 1-191, but unless there are 191 occurrences containing data, space in the record buffer is not allocated for any empty occurrences, resulting in incorrect field positioning when processing the record.

    If you are using the Event Replicator Target Adapter (if "SAGTARG" is specified as the destination class of some destination used by this subscription), any GFB names you select for the After Image Format Buffer parameter and the Before Image Format Buffer parameter must be the same. In addition, any GFB name you select for the Key-Related Before Image Format Buffer parameter must have been built from a Predict user view with the same name as the user view used to build the before and after images, but with the suffix "-KEY" on the end. (Likewise, if you use the Data Mapping Tool, the SGFORMATKEY GFB should be built from a DDM with the same name as the DDM used to build the before and after image GFBs.) Event Replicator processing strips off the "-KEY" to ensure that any delete is associated with the before and after image file name that was used to build the table(s) in the RDBMS.

    No default. This is a required field. Either a format buffer or a GFB must be supplied.
    Key-Related Before Image Format Buffer Using the drop-down list for this field, select a global format buffer definition or select "Format Buffer" to type in a format buffer to be used when decompressing the key-related before image.

    Format buffer specifications must conform to the format buffer rules (for read commands) described in the Adabas command reference documentation.

    If you are using the Event Replicator Target Adapter (if "SAGTARG" is specified as the destination class of some destination used by this subscription), any GFB names you select for the After Image Format Buffer parameter and the Before Image Format Buffer parameter must be the same. In addition, any GFB name you select for the Key-Related Before Image Format Buffer parameter must have been built from a Predict user view with the same name as the user view used to build the before and after images, but with the suffix "-KEY" on the end. (Likewise, if you use the Data Mapping Tool, the SGFORMATKEY GFB should be built from a DDM with the same name as the DDM used to build the before and after image GFBs.) Event Replicator processing strips off the "-KEY" to ensure that any delete is associated with the before and after image file name that was used to build the table(s) in the RDBMS.

    The field name followed by a period will be used as a default for this format buffer.
  2. When the format buffers have been specified, click OK.

    The List of Subscription SFILEs table appears.

Step 4. Save the SFILE Definitions

Start of instruction setTo save the SFILE definitions in the SFILE definition list for a subscription:

Step 5. Save the Subscription Definition

Start of instruction setTo save the subscription definition:

Top of page

Modifying SFILE Definitions in a Subscription

Start of instruction setTo modify the SFILE definitions in a subscription:

  1. List the SFILE definitions in Event Replicator Administration, as described in Listing SFILE Definitions.

    The SFILE definitions for the subscription (if any) are listed in a List of Subscription SFILEs table in detail-view.

  2. Locate the SFILE definition you want to modify in the table in detail-view and click on either the database or file number of the definition.

    The detail-view lists the current settings for the SFILE definition you selected.

  3. Modify the settings for the SFILE definition as described in Adding SFILE Definitions.

  4. When all modifications have been made, click OK to save the changes to the SFILE definition or click Cancel to cancel the changes.

    The List of Subscription SFILEs table appears.

  5. Verify that at least one SFILE for the subscription is listed in the List of Subscription SFILEs table. Then click OK to save the list of SFILE definitions for the subscription.

    The general subscription information is listed in detail-view.

  6. Click OK to save the subscription.

Top of page

Deleting SFILE Definitions in a Subscription

Start of instruction setTo delete SFILE definitions included in a subscription definition:

  1. List the subscription definitions in Event Replicator Administration, as described in Listing SFILE Definitions.

    The SFILE definitions for the subscription (if any) are listed in a List of Subscription SFILEs table in detail-view.

  2. Locate the SFILE definition you want to delete in the table in detail-view and click on the check box for the definition in the All column of the List of Subscription SFILEs table. To select all definitions at once, click on the check box in the All column heading.

  3. Once all the definitions you want to delete are selected, click Delete to delete the selected SFILE definitions.

  4. Verify that at least one SFILE for the subscription is listed in the List of Subscription SFILEs table. Then click OK to save the list of SFILE definitions for the subscription.

    The general subscription information is listed in detail-view.

  5. Click OK to save the subscription.

Top of page