Skip to main content

Problem:

A customer encountered this error when trying to open a relative file.  There was  an open on an I/O relative file and then in a subsequent subprogram a further open on it which results in it being already locked hence the 9/065 (or 9A).

The customer then pointed out that this worked without problems in OCDS so why not in Server Express?

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 same_proc_excl_detection tunable.

same_proc_excl_detection

The same_proc_excl_detection tunable has been superseded by the intra_process_record_locking tunable. However, it can still be used for backward compatibility purposes. Note that we recommend that you modify your code to use the new intra_process_record_locking tunable where possible.  By default the same_proc_excl_detection tunable is ignored if intra_process_record_locking is set TRUE, which is the default. To use this tunable you must set intra_process_record_locking to FALSE.

Syntax: set same_proc_excl_detection={TRUE|FALSE}

Value: TRUE or FALSE.

Detects if you have tried to open a file multiple times in one run unit. If TRUE, any OPEN request has conditions applied to determine whether or not it is already open, and if so, if it was opened exclusively, in which case a file error is generated. Currently, if the same file is opened twice by the same run unit, no file error is generated. This flag should be set to TRUE for RMCOBOL compatibility.

Default: FALSE

Old KB# 7275

#RMCOBOL
#COBOL
#AcuCobol
#ServerExpress
#netexpress