Vision Filesystem - Rebuilding Error: Invalid function parameter


Attempting to rebuild a Vision file with vutil32 results in the error "invalid function parameter".


Attempting to rebuild a corrupted Vision file using vutil32 -r filename gives the following error message: "invalid function parameter". What does this mean? How can the file be rebuilt?


This message is seen when the file is broken in a way that causes the rebuild to fail. The file may be broken in a way that it will not be possible to recover any records at all. However there are a couple of things to try.

Specify a key to rebuild on:
vutil32 -rebuild -k 0 filename
for the primary key. If that fails try:
-k 1

for the first alternate key (if there is one), and so on for each alternate key.

If all of those fail it may be possible to programmatically recover the records. Set the Runtime configuration ERRORS_OK to "ON" which should allow the OPEN of the corrupted file to succeed. Then START at the beginning of the file and READ NEXT writing out each record to a second file with the same definition, until a file status is encountered that indicates failure. Then open the file again, START at the end and READ PREVIOUS, writing out each record to the second file, until a file status is encountered that indicates failure. The resulting file should contain all of the recoverable records.

If all of that fails then restoring a backup is recommended.

Old KB# 14121
Comment List