T_AUTOCOMMIT T_4CCOMMIT T_APPCOMMIT T_RCDLOCKS T_NORCDLOCKS T_READUNCOMMITTED T_READCOMMITTED T_REPEATABLEREAD T_SERIALIZABLE T_FREEONCOMMIT T_NOFREEONCOMMIT
sys.begin("T1",T_APPCOMMIT); dtf_key1 = 'AAA' dtf_key2 = '' if (sys.read_file(dt_file,F_MODIFY|F_NOMSG|F_WAIT) < 0) { sys.message(SM_ERROR,"Read Failed, Rolling Back Transaction"); sys.rollback("T1"); return; } cm_code = 'KJE001' if (sys.read_file(cust_mstr,F_MODIFY|F_NOMSG|F_WAIT) < 0) { sys.message(SM_ERROR,"Read Failed, Rolling Back Transaction"); sys.rollback("T1"); return; } cm_callcount += 1; if (sys.upd_file(cust_mstr,F_DEFAULT|F_NOMSG) < 0) { sys.message(SM_ERROR,"Update Failed, Rolling Back Transaction"); sys.rollback("T1"); return; } dtf_float1 += 1.1; dtf_int1 += 1; if (sys.upd_file(dt_file,F_DEFAULT|F_NOMSG) < 0) { sys.message(SM_ERROR,"Update Failed, Rolling Back Transaction"); sys.rollback("T1"); return; } if (sys.commit("T1") < 0) { if (sys.errno == ABORT_ERR) sys.message(SM_ERROR,"Transaction Aborted"); }