Skip to main content

This article explains why file status 9/065 occurs when a physical file is opened twice.

Problem:

We received file status 9/065 when trying to open a file on output mode . In the same program , the same physical file is opened in input mode with another file control name. We are using Server Express 5.1 and the same program runs fine with Object Cobol Developer Suite. Why is this?

Resolution:

File locking in OCDS did not take into account the fact that you might have two opens on the same file and so did not handle locks between the two opens. Under Server Express this is correctly handled. However, you can put the incorrect OCDS locking back in.

For compatibility with OCDS you can use the tunable with the value FALSE. For example in the file $COBDIR/etc/cobconfig:

set intra_prcess_record_locking=FALSE

Remarks :

In the file $COBCONFIG/etc/exthfh.cfg the following line must not be set :

RUNITLOCKDETECT=OFF

Old KB# 14631