This method does a rough compare of any common fields, determined by name, data type, and extent-matching, between the source buffer and the target buffer. The resulting logical value is either TRUE or FALSE as a whole. A single field that does not compare causes the entire buffer to return FALSE. If there are fields in one buffer that do not exist in the other, they are ignored.
Return type: LOGICAL
Applies to: Buffer object handle
You can specify an array element as one or both of the fields. This lets you compare a field or array element in one buffer to a field or array element in the other buffer, when the two fields do not have the same name. The order within each field-name pair does not matter; each pair must contain one field name from the source and one field name from the target.
You can also compare one entire array to another by specifying its name without a subscript.
If you want to compare BLOB fields only, you can set this option to FALSE and use the except-list option to exclude CLOB fields from the compare.
When comparing buffers in a ProDataSet object, the AVM checks as to whether the BUFFER-COMPARE( ) method satisfies the following two requirements:
If these two requirements are satisfied, the BUFFER-COMPARE( ) method identifies the fields to compare based on the pairs-list argument specified in the ATTACH-DATA-SOURCE( ) method for the data-source object, if any, along with either the except-list or include-list arguments, if any. Because the ATTACH-DATA-SOURCE( ) method already allows you to define a field mapping between a data-source object buffer and a ProDataSet temp-table buffer, as well as a list of fields to include or exclude from the operation, you do not need to specify these in the BUFFER-COMPARE( ) method.
When comparing records that contain BLOB fields, the AVM performs a binary comparison on the BLOB data associated with the source and target records.
Use the no-lobs option with the BUFFER-COMPARE( ) method to ignore large object data when comparing records that contain BLOB or CLOB fields. You can also use the except-list option to exclude BLOB and CLOB fields from the compare.
The following example fragment performs a binary compare of all fields in the buffers, except for the two specified fields: