native vs. managed

I have moved a legacy native COBOL application to Linux to run under the Visual COBOL runtime. Some of the files are defined as external in their file descriptors ie. opened once and shared between modules within the run unit.
At the same time I am exploring access to the same application's files from a web front end through Java and Visual COBOL wrappers around native code.
Both systems run successfully in isolation but if the native application is started after the webapp, the files declared external fail to open returning runtime error 9/064. I have no definition for this error.
Can you explain what is happening here?

  • Are you sure that it is not a 9/065 error instead of a 9/064 error?

    A 9/065 error is a locked file and this would occur if you are not opening the file in a sharable manner.

    How is the file defined in the SELECT statement? Do you have a LOCK MODE clause defined as either AUTOMATIC or MANUAL? If you do not have a LOCK MODE clause then the file will be opened as exclusive which means it is not sharable.


  • The native application is a multi-user system, currently running on Solaris with LOCK MODE IS MANUAL on all files. I am moving this to Linux/Visual COBOL as-is. The managed code project is built with the same FC/FD copybooks in the core COBOL modules.

    I can't be sure the EXTERNAL attribute is relevant, except that I assume these files would be held open by the web session. They are then the first to be opened by the native application before quitting. The web app does not suffer the same effect if the native application is started first. Moreover I can open additional green screen sessions on the back of the first.

    I realise the runtime error code is not defined but I'm sure it's correct and just thought it might mean something to you.

    My concern is that I wouldn't be able to develop and run managed code alongside and as an extension of the green screen application. If you are saying I should not be hitting any restrictions or limitations then I can investigate further with a smaller demo.

    Thank you.

  • Verified Answer

    Sharing files between native and managed programs is definitely supported so there must be something else at play here.

    If you could open up a support incident and provide us with a cutdown example we should be able to investigate this for you.

    I have no idea what a RTS error 9/064 is but I will try to find out.


  • Hi,
    I' m getting the same 9/064. Is there a solution by now? Otherwise I will open an appropriate support incident.
  • Chris,

    9/064 is incompatible file locking mode.
  • As Gael points out the 9/064 file status is now documented as follows:

    COBRT064 Incompatible file locking mode (Recoverable) Micro Focus

    A process has attempted to open the file using a different locking mode than the one that is already in place.

    The locking mode is determined by the tunable strict_file_locking. All processes accessing the same file need to be using the same locking mode (that is, all have the tunable set to the same value).

    The default setting of this tunable has been changed as of Visual COBOL 2.3. This is documented under the section on File Locking in the section of the docs here:

    Try setting the tunable strict_file_locking=false if you are experiencing issues.