ContentsIndexPreviousNext

3.3.7 Unloading to Binary and Line Sequential Format

The "unload" option will create a binary sequential file or a line sequential file from a Vision file. The command is:

vutil  -unload  [ -v ]  [ -b | -t ]  [ -q ]  source  destination

The source file is the Vision file to unload; the destination is the name of the file to create. If a file with the name destination already exists, it is deleted first. The records in the destination file are ordered by the primary key of the source file. This can be used to export data to other applications. vutil will not let you unload records from an encrypted file.

These are the destination file format options:


Note: By default, the destination file is assumed to be a binary sequential file with an alternate format that is not compatible with the ACUCOBOL-GT runtime.
-v This option produces a file that has variable-length records. Variable-length records occupy only as much disk space as necessary. Two or four bytes indicating record size are placed in front of each variable-length record when it is written to disk. (Different machines generate different prefixes. Thus, files produced with "vutil -unload -v" can be loaded with "vutil -load -v" on the source machine but are not necessarily portable to other machines.) The two- or four-byte field that is added to the record is not specified in your COBOL program, but some programs that access the records need to be aware of the extra bytes.

If "-v" is not present, fixed-length records are written.

-b This tells "vutil -unload" to produce a binary sequential file that is compatible with the ACUCOBOL-GT runtime.

If "-v" is not present, fixed-length records are produced.

The "-v" option causes vutil to produce variable-length records. The record length is stored in a two-byte record header.

-t This tells "vutil -unload" to produce a file that has line sequential format. This means that the destination file is a simple text file, with records separated by line feeds.

This option implies "-v" (variable-length records), so the "-v" option is not necessary, although it is allowed.

-q This option causes vutil to exit (with status 99) if user interaction is required.