Trace files 'Using SAFE mode for file access'



What does this entry, seen in the runtime trace file, mean?

     Using SAFE mode for file access


On Windows systems, the speed of file access to Vision files located on a shared drive can vary.  The cause of this variability is attributed to interaction between the way Windows handles file locks and the way it caches shared files on the local system.  

In Version 4.3.1, to overcome that variability and improve performance, the method used to open Vision files on Windows shared drives was changed.  Subsequently, although most users experienced good performance and no problems, some users experienced sporadic file corruption problems (file status 98).

To minimize the possibility of these errors, in Version 5.2.1 ACUCOBOL-GT reverted to the pre-4.3.1 method of opening files which is noted in the runtime trace as 'safe mode'.  Although this method can result in somewhat slower performance opening the file, it is safer.  

The faster method can still be used and is configurable via a Windows registry entry.

location:  HKEY_LOCAL_MACHINE\Software\Acucorp, Inc.\ACUCOBOL-GT

key:         GetUniqueId Uses CreateFile

type:        DWORD

value:       0   << fast mode >>

                 1 &nbsp ; << safe mode - the default from 5.2.1 forward >>

After setting this value to 0 the Runtime trace will show 'Using FAST mode for file access'.

Most users run in fast mode with no problems.  However, if the system exhibits file corruption (file status 98) then safe mode should be used.

Attached is a zip file containing an AcuCOBOL-GT program that will make the registry entry to set the method for accessing files to 'fast mode'. Executing the program with the included configuration file, safe.cfg, will return the file access to 'safe mode'.  This program is provided without warranty.  Since the program modifies the Windows registry a backup of the registry should be made prior to running it.

NOTE: The winreg program also disables Windows Opportunistic Locking.  Read more about Windows Opportunistic Locking in KB article 25084.

In Version 8 there is a new Runtime configuration variable, NT_OPP_LOCK_STATUS. Setting it to FAST or SAFE (still the default) has the same effect as setting the registry entry in previous versons.


Old KB# 2696
Comment List