New VISION indexed files created with ACUCOBOL-GT runtimes 10.0.0 and 10.0.1 cannot be opened nor read by runtimes of a previous version.
When an OPEN is executed, the file status returned is 39,01.
File status 39 means that there is a conflict between the indexed file and the COBOL description of the file itself, used to execute the OPEN statement.
The secondary error code 01 means that the cause of the mismatch is unkwnown to the runtime, since the status is returned by the host file system.
The first action to take is to check the version of this VISION file, using the vutil tool provided within the installation of the ACU runtime.
For example, use the following command-line:
vutil32 -info -x NameOfTheFile
If vutil returns "Incorrect file type", it may be useful to try with the vutil tool of the same version of the runtime that generated the file, for example 10.0.0 or 10.0.1.
Again, execute: vutil32 -info -x NameOfTheFile
If no error is returned, check the output.
The first line should provide information about the version of the indexed file.
The output may be something like this:
NameOfTheFile [vision version 6]
This is the cause for the error 39,01.
VISION version 6 is a new feature of ACUCOBOL-GT 10.x.x.
Only files CREATED (i.e.: OPEN OUTPUT or OPEN I-O with IO_CREATES ON) by ACU Runtimes 10.0 and later will be generated as of version 6.
All the other pre-existing files will keep their version, even if updated or rewritten by ACU 10.x.
Since this is a new version, previous runtimes cannot open these files.
To have these new indexed files manageable by pre-10 runtimes, they must be rebuilt.
Use the vutil tool 10.x.x with the following command-line:
vutil32 -rebuild -5 NameOfTheFile
where 5 is the suggested VISION version to use.
Please note that, in this case, the records marked as deleted will be physically removed from the file itself.
To avoid this situation in the future, file version can be forced using a configuration variable:
When all the runtimes will be upgraded to version 10.x.x, the variable V_VERSION can be removed.
For further information about the new functionalities of VISION version 6, click here.