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:
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>
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.