Dupdate - update a D-file with key matching

[ English | Japanese ]

[visit D-home]

SYNOPSIS

Dupdate [ -d ] [ -k key-flags] key-field-list input-file [update-file..]

DESCRIPTION

Dupdate reads D-records from the input file (input records) and matches them with D-records from the update file[s] (update records) by the key value specified by the key-field-list. When they match, input records are discarded and the update records are copied to the standard output. When they don't match, input records are copied to the standard output. Update records which do not match input records are also copied to the standard output in the key value order. The input file and update files must be sorted by the key-field-list order.

If no update file is given, Dupdate reads the standard input as the update file. When there are more than one update files, n-way matching is done and the latter one overrides the former ones. In other words, the result is same as to update the input file by the first update file and then to update this result by the second update file and so on.

The key may not be unique in the input or update files. In this case, the group of same key value input records are substituted by the group of same key value update records.

When -d option is specified, the [last] update file is the deletion file, which contains the deletion records. The records matched to the deletion records are discarded and not copied to the output. Usually, deletion records have only key fields. But they may have other fields, which are just ignored.

OPTIONS

-d
the last update file is the deletion file. If no update file is given, the standard input becomes the deletion file.
-k key-flags
default key-flags for the key-field-list. See the manual of Dintro.
-D [i/o]datautf=8|16|32
UTF I/O feature (see manual page of UTF I/O feature.)

ENVIRONMENT

Ddatautf, Didatautf, Dodatautf
for UTF I/O feature.

DIAGNOSTICS

See the manual of D_msg.

SEE ALSO

Dintro, Djoin, D_msg.

AUTHOR

MIYAZAWA Akira


miyazawa@nii.ac.jp
2003