ITONUM: Converting a Large Number 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 Binary Integer to Double-Precision Format
ITONUM(maxbytes, infield, output)

where:

maxbytes

Numeric

Is the maximum number of bytes in the 8-byte binary input field that have significant numeric data, including the binary sign. Valid values are:

5 ignores the left-most 3 bytes.

6 ignores the left-most 2 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

Double precision floating-point (Dn)



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

ITONUM converts BINARYFLD to double-precision format.

ITONUM(6, BINARYFLD, 'D14')

iWay Software