dbupdate - Database Update

dbupdate [-fiR] [-I FieldDataFile] SourceDataArea DestinationDataArea LogFile file ...

dbupdate -V

The dbupdate command retrieves data records from the source data area file using the saved primary key in the log file; then converts, inserts, or updates records in the destination data area file to match the source data area file.

If a record exists in the destination data area but is not found in the source data area, then the record is deleted from the destination data area.

In order for dbupdate to process a file, the number, names, and order of fields in the primary keys for the specified files in the source and destination data areas must match. Field types and sizes do not need to be identical, as long as the field values can be converted.

Program Option Description
f Fix records, if needed, while copying.
i Ignore errors while copying.
R Reject records with bad keys while copying.
I FieldDataFile

Read in data to initialize specified fields in the destination file. Each row represents one field to be initialized with the value specified.

Note: The format for the data in FieldDataFile is

FileName FieldName FieldOccurrence FieldValue

The data in FieldDataFile may be space, tab, or comma-delimited. Each entry (row) is delimited by a newline character.

If FieldName in FieldDataFile exists in both source and destination data areas, then the corresponding FieldValue will override the value read in from the source database.

FileName The file in the destination data area that this row contains a default value for.
FieldName The name of a field in FileName that this row contains a default value for.
FieldOccurrence

The number of times FieldName occurs.

FieldOccurrence must be set to 1 (one) or higher.

FieldValue

The default value you want to populate FieldName. The value must be conform to the standard format for each field data type. Valid data types are described in the Doc for Developers: Application Development Workbench.

Expressions can be used to specify FieldName.

SourceDataArea The data area containing the file whose values you want to use to update the file in the destination data area.
DestinationDataArea The data area containing the file that you want to update.
LogFile The file that recorded changes to the database. See the Data Access guide for your database for information about setting up database change logs.
file ... The name(s) of the file(s) that you want to update.
V Prints the version of dbupdate.