ITONUM: Converting a Large Number from Integer to Double-Precision Format

How to:

The ITONUM function converts a large number in a non-FOCUS data source from special long integer to double-precision format. This is useful for some programming languages and some non-FOCUS data storage systems that use special long integers, which do not fit the regular integer format (four bytes in length) supported in the synonym, and, therefore, require conversion to double-precision format.

You must specify how many of the right-most bytes in the input field are significant. The result is an 8-byte double-precision field.


Top of page

x
Syntax: How to Convert a Large Number From Integer to Double-Precision Format
ITONUM(maxbytes, infield, output_format)

where:

maxbytes

Numeric

Is the maximum number of bytes in the 8-byte infield that have significant digits, including the binary sign. Valid values are:

5 ignores the 3 left-most bytes.
6 ignores the 2 left-most bytes.
7 ignores the left-most byte.

infield

A8

Is the field that contains the number. Both the USAGE and ACTUAL formats of the field must be A8.

output_format

Double precision floating-point (Dn.d)



Example: Converting a Large Binary Integer to Double-Precision Format

ITONUM converts BINARYFLD to double-precision format.

ITONUM(6, BINARYFLD, 'D14')

iWay Software