Comparing MEMPTR and RAW data types
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Comparing MEMPTR and RAW data types
ABL provides two data types to store data in a raw (binary) form, MEMPTR and RAW. MEMPTR and RAW data
types provide similar features, but serve different purposes, as
follows:
- You can use both
MEMPTRandRAWvariables to store binary data that originates with any other data type in ABL or that you import from another environment using an EPI. - You can use
MEMPTRvariables to directly exchange data between ABL and a supported EPI environment; you can useRAWvariables only to exchange data with another ABL data type, includingMEMPTR. - You can define
RAWfields in an OpenEdge database, but you cannot defineMEMPTRfields. You can move database fields and records to and fromMEMPTRvariables usingRAWvariables as intermediate storage.
In sum, the RAW data type supports the storage
and movement of binary data within the local ABL and OpenEdge database
environment, while the MEMPTR data type supports
the storage and movement of data between the local ABL and external
ABL or non-ABL environments.
You can also assign values between MEMPTR and RAW variables
directly using the ABL assignment operator (=). If the target variable
is RAW, ABL resizes the target, if necessary, to
make it the same size as the source. For both assignment between MEMPTR and RAW variables
and assignment between two variables of the same data type, the
source and the target variables maintain separate and complete copies
of the data.