- 156 -
(3) CODE128 code selection
In the case of CODE128 (with auto code selection), code selection is performed in
the following manner. (Conforming to USS-128 APPENDIX-G)
c Determining the start character
(a) If the data begins with four or more consecutive numerals, the start code
to be used is (CODE C).
(b) In any case other than (a) in c, if a control character appears before a
small letter (see f.) or four or more consecutive numerals, the start code
is (CODE A).
(c) In none of the above cases, the start code is (CODE B).
d If the data begins with an odd number of digits in (a), c:
(a) Insert the (CODE A) or (CODE B) character just before the last numeric
data. When (FNC1), if found in the number, breaks a pair of digits in the
number, insert the (CODE A) or (CODE B) character before the numeric
data preceding the (FNC1). Selection of (CODE A) or (CODE B) should
conform to (b) and (c) in c.
e If four or more digits of numeric data continue in (CODE A) or (CODE B).
(a) When the numeric data is an even number of digits, insert the (CODE C)
character just before the first numeric data.
(b) When the numeric data is an odd number of digits, insert the (CODE C)
character immediately after the first numeric data.
f If a control character appears in (CODE B):
(a) In the subsequent data, when a small letter appears before the next
control character or four or more consecutive digits, insert the (SHIFT)
character before the first control character.
(b) When not so, insert the (CODE B) character just before the first control
character.
g If a small letter appears in (CODE A):
(a) In the subsequent data, when a control character appears before the next
small letter or four or more consecutive digits, insert the (SHIFT)
character before the first small letter.
(b) When not so, insert the (CODE B) character just before the first small
letter.
h If any data other than the numerals appears in (CODE C):
(a) Insert the (CODE A) or (CODE B) character just before the data other
than the numerals. Selection of (CODE A) or (CODE B) should conform
to (b) and (c) in c.