ContentsIndexPreviousNext

3.3.5 Extracting Records From a File

The "extract" option prints selected records on the standard output. The command syntax is:

vutil  -extract  [ -x ]  [ -k# ]  [ -n#]  [ -v value ]
[ -q ]  file

When using the "extract" option, you may use command line options to specify the primary key, starting value, and the number of records. If you do that, vutil will not interrupt the "extract" later (after printing a synopsis of the file) in order to ask you for those parameters. vutil does a START NOT LESS THAN on the desired key and proceeds to print records on the standard output. Each record is printed on its own line.


Note that if the file contains binary or COMP-3 data, then this data may contain carriage returns (binary "0D"s). Each binary "0D" will be interpreted as a carriage return, and that will be reflected in the display of the extracted record.
These are the options available with "-extract":

-k This option can be used to specify a key number to extract from.

-n This option can be used to specify the number of records to be extracted.

-v This option can be used to specify the key value from which to start the extract.

-q When you use this option, the key number defaults to "0" (zero), the number of records defaults to "all", and the keyval defaults to low-values (unless you specify these values with the -k, -n, and -v options).

-x This option allows record extraction to continue if an error occurs. Any records that generate errors are not included in the output file.

vutil will not let you extract records from an encrypted file.