The CURRENCY key type represents an 8-byte signed quantity, sorted and stored in Intel binary integer format; therefore, its internal representation is the same as an 8-byte INTEGER data type. The CURRENCY data type has an implied four digit scale of decimal places, which represents the fractional component of the currency data value.
The sign nibble is either 0xF or
0xC for positive numbers and
0xD for negative numbers. By default, the Relational Engine and the SDK access methods that use it always
write 0xF as the positive sign nibble for a DECIMAL. They can interpret both 0xF and 0xC as being positive on a
read operation.
In most operating systems, the key is HKEY_LOCAL_MACHINE\SOFTWARE\PERVASIVE SOFTWARE. However, its location under
HKEY_LOCAL_MACHINE\SOFTWARE can vary depending on the operating system.
You must manually specify a setting on the machine running the PSQL database engine to enable the shifted format. The setting, DBCobolNumeric, must be set to “yes.” The rest of this topic summarizes use of this setting on Windows 32-bit, Linux, OS X platforms. See
NUMERIC in
SQL Engine Reference for the complete steps.
In most Windows systems, the key is HKEY_LOCAL_MACHINE\SOFTWARE\PERVASIVE SOFTWARE, but its location under
HKEY_LOCAL_MACHINE\SOFTWARE varies depending on the operating system.
Add the DBCobolNumeric setting to bti.ini below the [Database Names] entry: