


The "load" option will create an indexed file from a binary sequential file, a relative file, or a line sequential file. The command is:
vutil -load [ -b|d|t ] [-lnvr] source destination
The source file is the name of the binary, relative, or line sequential file to read. The destination file is the name of the Vision file to add to. This file must already exist; it is used to determine the record size and key information.
By default, records from the source file are added to the destination file. If the "-n" flag (new file) is used, then any data in the destination file is eliminated before the records are loaded from the source file.
These are the source file format options:
-v By default, the source file is assumed to be a binary sequential file with an alternate format.
The "-v" option causes vutil to treat the source file as a file with variable-length records. The record length is stored in the record's header. The length of the header is either two or four bytes, depending on your machine type.
If "-v" is not present, fixed-length records are read.
-b This loads a binary sequential file that is compatible with the ACUCOBOL-GT runtime into a Vision file.
If "-v" is not present, fixed-length records are read.
The "-v" option causes vutil to read variable-length records. The record length is stored in a two-byte record header.
-d This loads a relative file into a Vision file.
The "-v" option is not allowed for relative files.
Records marked as deleted in the relative file are discarded.
-t This loads a file that has line sequential format into a Vision file. This means that the source file is a simple text file, with records separated by line feeds. The source file may not contain any line feeds within the data fields, because a line feed denotes the end of a record.
This option implies "-v" (variable-length records), so the "-v" option is not necessary, although it is allowed.
Normally, vutil locks the destination file to improve the performance of the load operation. If you need to allow simultaneous access to the destination file while vutil is operating, you can use the "-l" flag to prevent vutil from locking the file.
The "-r" option causes any "duplicate key" write errors to be retried as rewrites to the file. This option should be used with caution, because duplicate key write errors often indicate that an error exists in the target file description. Warnings about this problem are not seen when you use the "-r" option.
If you are creating this file for the first time, you can either use the "gen" option of vutil or write a COBOL program to create the empty Vision file. The "load" function can be used to import data from another application.