Product Documentation

BTRV Edition User's Guide

Previous Topic

Next Topic

-tron

Sets the file mode for a file. Displays a message at the conclusion of the requested operation indicating success or an error message in the case of a failed operation.

Usage

ctutil -tron file_name T|P|F|W

where:

  • file_name - File name without extension.
  • T - Enable full transaction processing control (ctTRNLOG c-tree file mode). This mode is recommended for most applications and it is required to take full advantage of FairCom RTG advanced features.

    Note: By default, FairCom RTG files are created as ctPREIMG. When enabling full transaction control on these default files, no rebuild of the indexes is necessary.

    It is necessary to also adjust the ctree.conf file to enable full transaction logging for the file(s) affected. For example,

    <file name="CUSTMAST" dir=".">

    <transaction logging="yes">yes</transaction>

    </file>

  • P - Enable logical transaction processing control without logging (ctPREIMG c-tree file mode). This is the default mode and is indicated where both transaction atomicity and high performance are required. By suppressing transaction logging it is possible to achieve high data throughput at the expense of data recoverability. This mode is recommended in environments protected from system crashes or cases in which data integrity/recoverability is not an issue.
  • F - Asynchronous writes. This mode should only be used on files which data integrity is not critical as data recovery is not guaranteed in case of a system crash.
  • W - Synchronous writes (ctWRITETHRU c-tree file mode). This mode is indicated where transaction processing may not be suitable yet data safety remains critical.

See Also

Notes

FairCom RTG is transaction-ready and supports ROLLBACK out of the box. There is no need to enable <transaction logging> if you need ROLLBACK.

By default, FairCom RTG files are created as c-tree PREIMG files (an intermediate level of transaction processing supported by FairCom DB). This provides full atomicity of transactions including rollback with the best of performance. However, this model of transaction processing does not log transactions to disk, thus does not provide durability and recovery of transactions in case of system failure. Full transaction processing, provided by write-ahead logs on disk, provides complete ACID protection of data.

In addition, FairCom RTG allows working without any transaction capability. This is useful when you need extreme performance such as very large batch loads, etc.

ctutil provides for switching COBOL tables between these various modes. Be cautious when switching modes, as data loss can occur if an appropriate mode is not appropriately applied for specific usage patterns.

ACUCOBOL and Micro Focus programs support transaction processing in slightly different ways, as described below:

ACUCOBOL

ACUCOBOL has START TRANSACTION, so a transaction is explicitly started using a START TRANSACTION directive. See the ACUCOBOL documentation.

COMMIT TRANSACTION and ROLLBACK TRANSACTION directives are supported by both ACUCOBOL and Micro Focus.

An ACUCOBOL program allows you to rollback updates only if a file has been defined as WITH ROLLBACK. See the ACUCOBOL documentation.

Micro Focus

Micro Focus does not have START TRANSACTION. A transaction is automatically started first time you update a file that has been opened with the openwithrollback option.

COMMIT TRANSACTION and ROLLBACK TRANSACTION directives are supported by both ACUCOBOL and Micro Focus.

TOCIndex