Conditions for digit overflow

In data processing, depending on the format information of the input and output data, and the specification of the data size after conversion, digit matching or digit overflow of numeric data and character string data may occur. Below we explain how these processes take place.

(1) If the output field is a field type

Table 4.29 Conditions of digit overflow if the output field is a field type

Field type

No. of bytes

Conditions of digit overflow

X

 

The input data size exceeds the output size.

M

 

The input data size exceeds the output size.

N

 

The input data size exceeds the output size.

I

 

The input data size exceeds the output size.

9

 

The input data size exceeds 31 digits.

P

 

The input data size exceeds 31 digits.

S

 

The input data size exceeds 31 digits.

B

2 bytes

The input data is outside the range from -32768 to 32767.

4 bytes

The input data is outside the range from -2147483648 to 2147483647.

8 bytes

The input data is outside the range from -9223372036854775808 to 9223372036854775807.

F

4 or 8 bytes

  • The integral part of the input data exceeds 19 digits.

  • The decimal part of the input data exceeds 9 digits.

D

 

The input data size exceeds the output size.

Z

 

The input data size exceeds the output size.

= Remarks =

For code conversion, the size of the input data is measured by the size after conversion. For data combination and data division, the size of the input data is measured by the size after combination or division.

(2) If the output data is CSV (XML) format

Table 4.30 Conditions for digit overflow if the output is CSV (XML) format

Field type

Conditions of digit overflow

CSV numeric value

The input data is type F and the integral part exceeds 19 digits(#1).

XML numeric value

#1

:

If the decimal part of the input data exceeds 9 digits, the digits after the 9th digit are cut off. Note, however, that this does not result in a digit overflow error.

(3) Cutoff operation when a digit overflow occurs

If the data is numeric data (type 9, P, or S), the data is output as right-justified. As a result, the left part is cut off. If the data is type B, the maximum value is output. If the data is type F, the integral part of the input data is reduced to 19 digits or less, and the decimal part is reduced to 9 digits or less when output, but an error might occur depending on the precision.

If the data is a character string, the data is output as left-justified. As a result, the right part is cut off.

Table 4.31 Examples of digit overflow (when the number of digits for the input data is 10 and for the output data is 7)

Data type

Input data

Output data

Numeric data (type 9)

1234567890

4567890

Character string data

abcdefghij

abcdefg

(4) Data operation when a digit overflow occurs

If the number of input digits (or the input data size for character string data) is larger than the number of output digits or the maximum value that can be stored is exceeded, a digit overflow might occur for the numeric data or character string data. The operation when a digit overflow occurs depends on the values specified in Stop conditions in the Data Processing Settings.

Below we explain the processing when a digit overflow occurs.

a) Processing of numeric data (type 9) based on the stop conditions

Figure 4.112 Processing of numeric data based on the stop conditions

b) Processing of numeric data (type 9) preceded by leading zeros

Figure 4.113 Processing of numeric data preceded by leading zeros

c) Processing of character string data based on the stop conditions

Figure 4.114 Processing of character string data based on the stop conditions

d) Processing of character string data followed by trailing spaces

Figure 4.115 Processing of character string data followed by trailing spaces

e) Processing for conversion to data type M (conversion to a different kanji code type)

In the conversion to data type M, when the source data contains 2-byte codes, the data content might not be guaranteed, depending on the data size to be output. In a conversion in which a 2-byte code is divided in half, the 2-byte code is not output and a halfwidth space is output instead.

Figure 4.116 Processing for conversion to data type M (conversion to a different kanji code type) 1

Figure 4.117 Processing for conversion to data type M (conversion to a different kanji code type) 2

When a digit overflow occurs, the values of the data are not guaranteed.

Note

The operation for conversion between the same kanji code type is different from the above. For details, see Settings for the external character table of the output file.