Replicating Logged Transactions

This document covers the following topics:


Function Description

Actual replication operation first begins when the ETP replication task or tasks are running. Each start of a replication task causes the task to check and, when needed, to resynchronize its replicate files with the master. You can choose to restart a replication task manually, to restart the replication task by running your own program after each successful ET transaction on the master file, or to allow the self-restart function to restart and thereby resynchronize its replicate files each time a specified time period elapses. Software AG recommends that you start the replication task as a batch job (see the section Run the Entire Transaction Propagator in Batch Mode in the Installation for z/OS and Installation for z/VSE documentation).

Starting Replication Tasks Manually

If you do not specify a restart interval for a replication task, you must periodically start a replication task manually using the Replicate Transactions screen as described in this function description to resynchronize the related replicate files with the master.

Starting Replication Tasks with a User Program

Following every ET transaction that updates a master file, you have the option to invoke your own program. This program can be designed to restart the master file's replication task. The replication task then updates the related replicate files with the change logged by the ET transaction.

Your user program must first be defined in the Modify System Profile screen and enabled for the master file in either the Add Master File Definition or Modify Master File Definition screen. For more information about creating the ET user program, see ET-Time User Program.

Self-Restart Operation

Note:
Self-restart operation is recommended for batch operation only; online self-restart operation locks the user's terminal.

In self-restart mode, the replication task restarts at intervals defined for the replication task. After each interval, which is measured between two consecutive restart times, ETP restarts the replication task to force it to check for transactions that have been logged for the master file but not yet applied to the related replicate files.

Error Handling during Replication

If an error occurs while a previously logged transaction is being applied to a replicate file, the error is recorded and can then be displayed using the "Display Error Log for Replicate Files" function. To prevent further errors, replicate files which are in error status are not resynchronized.

Note:
When you use this function, the Natural DATSIZE buffer (explained in the Natural Parameter Reference documentation for details on specifying the DATSIZE profile parameter) will be increased to approximately 170 KB.

The Adabas response codes 9, 145, 148 and 224 are considered to be transient; that is, they are assumed to not occur again for the next replication. If one of these codes does occur, the error status of the replicate file does not need to be reset explicitly. The code will be ignored when replication restarts.

To restore the replicate file to normal status, use the "Reset Error" utility function. Ensure that the failure cause has been corrected before resetting the error code; see the Reset Error State for Replicate File function. Error codes for database errors are in the Natural message range 3001-3255. See Specify Master File Databases in Installing the Entire Transaction Propagator (Installation for z/OS and Installation for z/VSE documentation), for more information.

If a catastrophic error occurs (the job or session has been cancelled) while the replication task is using a replicate one or more replicate files remain marked as being "in use". Replicate files which are designated "in use" are not resynchronized; this prevents parallel access by different tasks. To restore the state of the replicate file, use the Reset Replicate File In-Use State function.

The task reports the number of replicate files which are in error status, or in use. Use the Display Error Log for Replicate Files function to show which files are in error.

If, however, the error report does not provide you with enough information to correct the error, proceed as described under the heading Reporting ETP Errors.

Displaying the Replicate Database Summary

The replication task displays a summary of the activities the task performs on processed replicate databases. This summary information can be useful when rearranging master and log file definitions to improve replication performance. This summary is not displayed if an error occurs.

Processing of Replication Task Messages

The subprogram WADUSER3 is used to display all messages issued by the replication task. WADUSER3 can be modified to filter the task messages and, if desired, send them directly to the operator console. For more information about the WADUSER3 subprogram, which is delivered in source form with ETP, see Installing the Entire Transaction Propagator in the Installation for z/OS and Installation for z/VSE documentation.

Replicate Transactions

You must use the following screen function to manually replicate master file changes to either all or selected replicate files.

By either entering the Replicate Transactions direct command REP TR or selecting the R task on the ETP main menu, the screen shown below appears.

The Replicate Transactions Screen

 23:59:59          ***** ENTIRE TRANSACTION PROPAGATOR *****          2000-12-24
                             Replicate transactions


 Log file and replicate database range

                            DBID      FNR
   First log file ......* _____1   _____1
   Last  log file ......* ___254   ___255
   First replicate DB ..* _____1
   Last  replicate DB ..* ___254



 Self-restart interval .............................. ________ (hh:mm:ss)
 Number of updates for which ETs are to be skipped .. __200
 Number of READs before STOP TASKS flag is checked .. _1000
 User-specific ET data processing                     N (Y/N)



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

The screen fields and their possible settings are described in the following table:

Screen Field Description

First Log File
DBID/FNR
Enter the database ID (DBID) and file number (FNR) of the first (inclusive) or only log file for which the replication task is to be started. To start a task for only one log file on a database, enter the database ID and file number in both these fields and in the "Last Log File" DBID/FNR fields. The default (database 1/file 1) in this field and the "Last Log File" field default select all master/replicate files. If you enter a wild card in either the database ID or file number field, a window appears that lists all selected log files. You can select only one file.
Last Log File
DBID/FNR
Enter the database ID and file number of the last (inclusive) or only log file for which the replication task is to be started. The default (database 65535/file 65535) in this field and the "First Log File" field default select all files. If you enter a wild card in either the database ID or file number field, a window appears that lists all selected log files. You can select only one file.
First/Last Replicate
DBID
Enter the database ID of the first/last (inclusive) or only replicate database to which the replication task will apply transactions of the selected log files. If you enter a wild card in either the database ID, a window appears that lists all selected databases. You can select only one database.
Self-Restart Interval Specify the elapsed time between restarts of the replication task. If this field is left blank, no restart interval applies. Valid values range "00:00:01" through "24:00:00".
Number of updates for
which ETs are to be skipped
Enter the count of update calls to the master file for which corresponding ET calls to the replicate file's database will not to be made. Each ET issued to the master file results in a corresponding ET call to the replicate file's database, preceded by updates to the affected confirmation files. With this count (n), you can specify that the first n update calls to the master file will not result in ET calls to the replicate file's database. If an ET is not issued, the confirmation files are also not updated.
The default (0) means that no ET calls to the replicate file's database are skipped. When the specified count of calls has been skipped, the calls begin and continue until the next ET call to the master file. The count is then reset, and skipping begins anew.
Number of READs before
STOP TASKS flag is checked
This number is the count of READ calls made before ETP checks for a user-requested stop for all asynchronous tasks. If asynchronous tasks are to be stopped, execution ends after the next ET command.
User-Specific ET data Specify Y (yes) to perform an explicit Adabas OP ET processing command for the replicate files to set the ET user ID of a user who updates the master file. The default is N (no). Skipping ETs is not possible when user-specific ET data processing is desired.