Data processing when digit matching occurs

If the number of input digits (or the input data size for character string data) is smaller than the number of output digits, digit matching for numeric data or character string data is performed. If the output type is type I, all input data is handled as character string data.

Digit matching is processed as described below.

(1) For numeric data

Leading zeros are added until the specified number of digits is reached.

Figure 4.118 Digit matching for numeric data (1)

However, if outputting to type Z, halfwidth spaces are added at the end.

Figure 4.119 Digit matching for numeric data (2)

(2) For character string data

Spaces are added at the end until the specified data size is reached.

 

If outputting to type M, X, or D, halfwidth spaces are added.

Figure 4.120 Digit matching for character string data (1)

If outputting to type N, fullwidth spaces are added.

Figure 4.121 Digit matching for character string data (2)

Note

If fullwidth spaces are used for padding and a digit overflow occurs, a data processing error is generated.

(3) For type I

Null characters (0x00) are added at the end until the specified data size is reached.

(4) For JIS code conversion (output to type M or D)

If outputting to type M or D, if the character at the end of the input data is not an ASCII character and the number of digits to fill for matching is 4 or more, an ASCII escape sequence is added to the first 3 bytes. To the 4th byte and thereafter, halfwidth spaces are added until the specified data size is reached.

Figure 4.122 For JIS code conversion (output to type M or D) 1

If the character at the end of the input data is not an ASCII character and the number of digits to fill for matching is less than 4, halfwidth spaces are added at the end until the specified data size is reached.

Figure 4.123 For JIS code conversion (output to type M or D) 2

Note that if the last character of the input data is an ASCII character, only halfwidth spaces are used for padding, regardless of the number of digits to fill for matching.