Updating Lawson Data Between Data Areas with dbupdate
The dbupdate command retrieves data records from the source data area file using the saved primary key in the log file. It 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, the record is deleted from the destination data area.
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.
To update data
dbupdate [-fiR]
[-I
FieldDataFile]
SourceDataArea
DestinationDataArea
LogFile
file ...
where the following program options may be used.
Program Option | Description |
---|---|
-f
|
If needed, fix records 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. The format for the data in
The data
in Note: If
FieldName
in
FieldDataFile
exists
in both source and destination data areas, then the corresponding
FieldValue
overrides
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.
Set this option 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 Lawson data types are described in the Lawson Doc for
Developers: Application Development Workbench.
|
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. Configuring Database Change Logs for dbupdate |
file ...
|
The name(s) of the file(s) that you want to update. |
-V
|
Prints the version of dbupdate. |