


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 ] [ -q ] 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.
When doing a load , vutil places records that are rejected due to illegal duplicate keys into a file. Should this happen, vutil will report the name of the file that contains the rejected records. The format of this file is the same as a COBOL binary sequential file with variable-size records.
These are the source file format options:
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.
-l You can use the "-l" flag to prevent vutil from locking the file if you need to allow simultaneous access to the destination file while vutil is operating. Normally, vutil locks the destination file to improve the performance of the load operation. When "-l" is not used, vutil adds records to the file using "bulk addition" mode, which generally runs faster.
-n 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.
-q This option causes vutil to exit (with status 99) if user interaction is required.
-r This 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.
-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.
-v This 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.
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.