ITOZ: Converting a Number to Zoned Format

How to:

The ITOZ function converts a number in numeric format to zoned-decimal format. Although a request cannot process zoned numbers, it can write zoned fields to an extract file for use by an external program.


Top of page

x
Syntax: How to Convert a Number to Zoned Format
ITOZ(length, in_value, output)

where:

length

Integer

Is the length of in_value in bytes. The maximum number of bytes is 15. The last byte includes the sign.

in_value

Numeric

Is the number to be converted. The number is truncated to an integer before it is converted.

output

Alphanumeric



Example: Converting a Number to Zoned Format

ITOZ converts CURR_SAL to zoned format.

ITOZ(8, CURR_SAL, 'A8')

iWay Software