Created On: 25 September 2012
Problem:
A Vision version 4 file is about 5 GB total size with 37 million records. It has two keys and there is a need to specify an existing field as another key. A COBOL program was created to read the existing file and write to the new file. That program executed very slowly. It had not finished after running for over a day. The file is used for a batch process that must run every day so a faster method is needed.
Resolution:
The vutil -unload and -load options will produce much faster results in moving the data from the old file to the new file.
First, unload the data into a binary sequential file using:
vutil -unload -b originalfile tempfile
Next create the new empty file with an OPEN OUTPUT from a COBOL program.
Next, after you have an empty file with the new definition load the data with:
vutil -load -b temptfile newfile
Lastly rename the newfile with the original file name.