The -load option creates an indexed file from a binary sequential file, a relative file, or a line sequential file. The command is:
vutil -load [-b|d|t] [-lnv(r|s)x] [-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.
The input file is buffered according to the value in the A_SEQ_DEFAULT_BLOCK_SIZE variable. The variable must be set in the environment for vutil to use it. If the variable is not set, the default buffer block size is 4096 bytes. If the variable is set to "0", vutil -load into a sequential file will perform record-based I/O. If the variable is set to a positive value, that value will be rounded up to the power of two equal to, or greater than the value. This will be the buffer size in bytes. The maximum buffer size is 1GB.
By default, the source file is assumed to be a binary sequential file with an alternate format.
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.
The -v option is not allowed for relative files.
This option is incompatible with the -load -s option.
This option is incompatible with the -load -r option.
This option implies -v (variable-length records), so the -v option is not necessary, although it is allowed. Line sequential files are assumed to contain variable length records. As such, they can only be loaded into Vision files that have been generated to accommodate the needed range of record sizes. If, however, the file contains records that are uniformly fixed length, the Vision file can be generated to accommodate only that fixed length. Should vutil attempt to load variable length records into a fixed record-size Vision file, an invalid record size error will occur. The error is reported as a generic parameter error.
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.
If an error occurs, an exit status of 255 is returned.