Skip to main content

Hello Micro Focus Community,

I'm encountering difficulties when attempting to use transactions with AcuCOBOL-GT 10.4. Initially, I noticed that version 10 includes, by default, the RMFM file system, which, according to a community post, doesn't support transactions. I reverted to a previous version, and the errors ceased.

However, when performing a ROLLBACK, the information is committed, and the reversal is not carried out as expected. Below is a simplified example of my code:

START TRANSACTION.
SET WF-OK TO TRUE.
PERFORM REGISTER-INFO
IF WF-OK
COMMIT
ELSE
ROLLBACK
END-IF.

The code above involves processing various records, each handled by different paragraphs (REGISTER-CLIENT, REGISTER-PRODUCTS, etc.). Upon executing ROLLBACK, the information is not rolled back as anticipated.

Any suggestions on how to approach this issue? Has anyone faced a similar situation with AcuCOBOL-GT 10.4 or has insights on configuring transactions correctly in this version?

I appreciate any help or guidance you can provide!


#SupportTips/KnowledgeDocs
#SupportTip

Hello Micro Focus Community,

I'm encountering difficulties when attempting to use transactions with AcuCOBOL-GT 10.4. Initially, I noticed that version 10 includes, by default, the RMFM file system, which, according to a community post, doesn't support transactions. I reverted to a previous version, and the errors ceased.

However, when performing a ROLLBACK, the information is committed, and the reversal is not carried out as expected. Below is a simplified example of my code:

START TRANSACTION.
SET WF-OK TO TRUE.
PERFORM REGISTER-INFO
IF WF-OK
COMMIT
ELSE
ROLLBACK
END-IF.

The code above involves processing various records, each handled by different paragraphs (REGISTER-CLIENT, REGISTER-PRODUCTS, etc.). Upon executing ROLLBACK, the information is not rolled back as anticipated.

Any suggestions on how to approach this issue? Has anyone faced a similar situation with AcuCOBOL-GT 10.4 or has insights on configuring transactions correctly in this version?

I appreciate any help or guidance you can provide!


#SupportTips/KnowledgeDocs
#SupportTip

I wanted to update everyone on the issue I was facing with ROLLBACK in AcuCOBOL-GT 10.4. After several unsuccessful attempts, I realized that the crucial detail preventing the ROLLBACK from functioning correctly was the absence of the following specification in my file SELECT statement: LOCK MODE IS MANUAL WITH ROLLBACK.

Here's an example of the corrected SELECT statement:

SELECT A4703
ASSIGN TO "A4703.DAT"
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
LOCK MODE IS MANUAL WITH ROLLBACK.

Adding the LOCK MODE IS MANUAL WITH ROLLBACK part resolved the issue, and now the ROLLBACK behaves as expected. I hope this information helps others facing a similar challenge.