A COBOL program with a Datacom SQL INSERT statement fails with a -147 error in DBXMMPR the COBOL preprocessor:
DB21012E ---- PREPARE STATEMENT FAILED (QHOST)
OP. NOT ALLOWED AT ISOL. LEVEL U
SQLCA-SQLCODE = -147
SQLCA-SQLSTATE = 25S01
Release : 15.1
Component : DATACOM SQL
See the explanation and action for SQLCODE -147
Reason:
The current logical unit of work reflects a transaction isolation level of U (user). As such, no insert, update, or delete operations are allowed.
The SQLSTATE that equates to this SQL return code is 25S01.
Action:
Verify that the transaction isolation level is the desired one, or eliminate the offending operation.
The default value for ISOLEVEL is U when SQLMODE=DATACOM.
This is documented in the Datacom/DB SQL Preprocessor Options under ISOLEVEL
Specify ISOLVEVEL=C in your COBOL source in the $DBSQLOPT statement:
*$DBSQLOPT SQLMODE=DATACOM AUTHID=SYSADM ISOLEVEL=C