Release 10.1A: OpenEdge Development:
Progress 4GL Handbook

> ## Using BUFFER-COPY and BUFFER-COMPARE

> When copying fields from one record buffer to another, `BUFFER-COPY` does it more efficiently than `ASSIGN`. Use the `EXCEPT` option when some fields are not to be copied, and the `ASSIGN` option when some fields are renamed during the copy operation. Even doing a `BUFFER-COPY` of a table with 100 fields is faster than an `ASSIGN` statement that copies a half dozen of those fields.

> In particular, the static `BUFFER-COPY` statement allows Progress to resolve the exact field list to copy and to identify the field mappings at compile time so that the operation can be made as fast as possible. Using the dynamic `BUFFER-COPY` method on a buffer handle requires Progress to evaluate the arguments during program execution, which of course is slower. As with all dynamic language, use the `BUFFER-COPY` method only when you truly don’t know the buffers or the fields to copy until run time.

> All this applies equally well to the `BUFFER-COMPARE` statement or method which compares two buffers and returns a list of differences. `BUFFER-COMPARE` is much faster than using a series of explicit comparison statements on individual fields.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095