Copy large objects
- Last Updated: January 21, 2026
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
The COPY-LOB statement copies large object data from one
BLOB or MEMPTR (or one
CLOB or LONGCHAR) to
another. It also handles copying data to or from the file system. The CONVERT phrase allows code page conversion of CLOB
values and LONGCHAR values.
Here is the syntax for the COPY-LOB statement:
Syntax
|
You can copy the entire contents of the source to the target with COPY-LOB. You can also use the COPY-LOB statement to copy part of a file (for example, using STARTING AT or FOR) to the
target. For more information about the COPY-LOB statement,
see ABL Reference
You can
also use the ASSIGN statement to copy large object
data between the database, temp-table fields, and memory. For example, the
following ASSIGN and COPY-LOB statements
(where m2 is a MEMPTR) are functionally
equivalent:
|
You can assign large object data from one BLOB or MEMPTR to
another, and from one CLOB or LONGCHAR to
another. You cannot assign large object data between BLOB and CLOB values
or MEMPTR and LONGCHAR values.
However, you can accomplish this indirectly by using the COPY-LOB statement.
COPY-LOB file operations involving LONGCHAR variables
are limited to 1GB - 1 byte.