Data Mirroring

File System Journalization

To enable journalization, you must first define the system journal directory/file(s), which is typically done in the application START_UP program, and then enable journalization on either all files or a specific file. Once enabled, PxPlus will automatically journalize all updates to the designated files, and if journaling all file updates, the system will also journalize all file creates, deletions and renames.

Important Note:

Prior to PxPlus 2023 Update 1:  Files with extended records cannot be journalized and therefore cannot be used with Data Mirroring.

PxPlus 2023 Update 1 or later:  Files with extended records can be journalized and therefore can be used with Data Mirroring. There is a size limit of 8MB for extended records. Records larger than that cannot be journalized, and any attempt to write the record will result in an Error #108: Record size error.

(Support for the journalization of files with extended records was added in PxPlus 2023 Update 1.)

To open the system journal directory/file, you need to issue the following command:

SYSTEM_JRNL OPEN pathname$

Where:

pathname$ can be either a directory or a file.

If directory, the system will create one or more journal files in this directory. Each journal file will be called journal.nnn, where nnn is a sequence number for the journal.

If file, the file can grow to 2GB, and then a new file must be defined.

Note:
If you rename a file on the main system after the Data Mirroring system has been set up, that file will also be renamed in the target system. See SYSTEM_JRNL directive.

(The renaming logic was added in PxPlus 2014 Feature Pack 1)

To enable journalization either for all files or a specific file, use the following command:

 

For all files

SYSTEM_JRNL ENABLE *

 

For specific file

SYSTEM_JRNL ENABLE pathname$

Where:
pathname$ is the name of the file for which journalization is to be enabled. When enabling on a file-by-file basis, the file requires that a journal file be present.

Note:
Adding the SYSTEM_JRNL OPEN and SYSTEM_JRNL ENABLE commands to the application START_UP program tells the system where the journal file is located and which files to journalize (asterisk * indicates all files).

To disable journalization either for all files or a specific file, use the following command:

 

For all files

SYSTEM_JRNL DISABLE *

 

For specific file

SYSTEM_JRNL DISABLE pathname$

Where:
pathname$ is the name of the file for which journalization is to be disabled.