Message characters in the pattern are either re
placed by the fill character or remain unchanged in
the result, depending on the state of the significance
indicator. They may thus be used for padding, punc
tuation, or text in the significant portion of a field or
for the insertion of sign-dependent symbols.
Fill Character: The fill character is obtained from
the pattern as part of the editing operation. The first
character of the pattern is used as the fill character.
The fill character can have any code and may con
currently specify a control function. If this character
is a digit selector or significance starter, the indicated
editing action is taken after the code has been as
signed to the fill character.
Source Digits: Each time a digit selector or signifi
cance starter is encountered in the pattern, a new
source digit is examined for placement in the pattern, field. The source digit either is given a zone and
replaces the pattern character or is disregarded.
The source digits are selected one byte at a time,
and a source byte is fetched for inspection only once
during an editing operation. Each source digit is ex
amined only once for a zero value. The leftmost four
bits of each byte are examined first, and the right
most four bits, when they represent a decimal-digit
code, remain available for the next pattern character
that calls for a digit examination. When the leftmost
four bits contain an invalid digit code, the operation
is terminated. At the time the left digit of a source
byte is examined, the rightmost four bits are checked
for the existence of a sign code. When a sign code is
encountered in the four rightmost bit positions, these
bits are not treated as a decimal-digit code, and a
new source byte is fetched from storage for the next
pattern character that calls for a source-digit exami
nation.
When the source digit is stored in the result, its
code is expanded from the packed to the zoned for
mat by attaching the zone code 1111.
Significance Indicator: The significance indicator,
by its on or off state, the significance or
nonsignificance, respectively, of subsequent source
digits or message characters. Significant source digits
replace their corresponding digit selectors or signifi
cance starters in the result. Significant message char
acters remain unchanged in the result.
The significance indicator, by its on or off state,
indicates also the negative or positive value, respec
tively, of the source and is used as one factor in the
setting of the condition code.
The indicator is set to the off state, if not already
so set, at the start of the editing operation, after a
field separator is encountered, or after a source byte
is examined that has a plus code in the rightmost
four bit positions. Any of the codes1010, 1100, 1110, and 1111 is considered a plus code.
The indicator is set to the on state, if not already
so set, when a significance starter is encountered
whose source digit is a valid decimal digit, or when a
digit selector is encountered whose source digit is a
nonzero decimal digit, and if in both instances the
source byte does not have a plus code in the right
most four bit positions.
In all other situations, the indicator is not
changed. A minus sign code has no effect on the
significance indicator.
Result Characters: The field resulting from an edit
ing operation replaces and is equal in length to the
pattern. It is composed from pattern characters, fill
characters, and zoned source digits.
If the pattern character is a message character and
the significance indicator is on, the message charac
ter remains unchanged in the result. If the pattern
character is a field separator or if the significance
indicator is off when a message character is encoun
tered in the pattern, the fill character replaces the
pattern character in the result.
If the digit selector or significance starter is en
countered in the pattern with the significance indica
tor off and the source digit zero, the source digit is
considered nonsignificant, and the fill character re
places the pattern character. If a digit selector or
significance starter is encountered with either the
significance indicator on or with a nonzero decimal
source digit, the source digit is considered signifi
cant, is zoned, and replaces the pattern character in
the result.
Result Condition: All digits examined are tested for
the code0000. The sign of the last field edited and
whether all source digits in the field contain zeros
are recorded in the condition code at the completion
of the editing operation.
The condition code is made0 when the last field
is zero, that is, when all source digits examined since
the last field separator are zeros. When the pattern
has no digit selectors or significance starters, the
source is not examined, and the condition code is
madeO. Similarly, the condition code is made 0 when the last character in the pattern is a field sepa
rator or when no digit selector or significance starter
is encountered beyond the last field separator.
When the last field edited is nonzero and the sig
nificance indicator is on, the condition code is made
1 to indicate a result field less than zero.
Decimal Instructions 151
placed by the fill character or remain unchanged in
the result, depending on the state of the significance
indicator. They may thus be used for padding, punc
tuation, or text in the significant portion of a field or
for the insertion of sign-dependent symbols.
Fill Character: The fill character is obtained from
the pattern as part of the editing operation. The first
character of the pattern is used as the fill character.
The fill character can have any code and may con
currently specify a control function. If this character
is a digit selector or significance starter, the indicated
editing action is taken after the code has been as
signed to the fill character.
Source Digits: Each time a digit selector or signifi
cance starter is encountered in the pattern, a new
source digit is examined for placement in the pattern
replaces the pattern character or is disregarded.
The source digits are selected one byte at a time,
and a source byte is fetched for inspection only once
during an editing operation. Each source digit is ex
amined only once for a zero value. The leftmost four
bits of each byte are examined first, and the right
most four bits, when they represent a decimal-digit
code, remain available for the next pattern character
that calls for a digit examination. When the leftmost
four bits contain an invalid digit code, the operation
is terminated. At the time the left digit of a source
byte is examined, the rightmost four bits are checked
for the existence of a sign code. When a sign code is
encountered in the four rightmost bit positions, these
bits are not treated as a decimal-digit code, and a
new source byte is fetched from storage for the next
pattern character that calls for a source-digit exami
nation.
When the source digit is stored in the result, its
code is expanded from the packed to the zoned for
mat by attaching the zone code 1111.
Significance Indicator: The significance indicator,
by its on or off state,
nonsignificance, respectively, of subsequent source
digits or message characters. Significant source digits
replace their corresponding digit selectors or signifi
cance starters in the result. Significant message char
acters remain unchanged in the result.
The significance indicator, by its on or off state,
indicates also the negative or positive value, respec
tively, of the source and is used as one factor in the
setting of the condition code.
The indicator is set to the off state, if not already
so set, at the start of the editing operation, after a
field separator is encountered, or after a source byte
is examined that has a plus code in the rightmost
four bit positions. Any of the codes
The indicator is set to the on state, if not already
so set, when a significance starter is encountered
whose source digit is a valid decimal digit, or when a
digit selector is encountered whose source digit is a
nonzero decimal digit, and if in both instances the
source byte does not have a plus code in the right
most four bit positions.
In all other situations, the indicator is not
changed. A minus sign code has no effect on the
significance indicator.
Result Characters: The field resulting from an edit
ing operation replaces and is equal in length to the
pattern. It is composed from pattern characters, fill
characters, and zoned source digits.
If the pattern character is a message character and
the significance indicator is on, the message charac
ter remains unchanged in the result. If the pattern
character is a field separator or if the significance
indicator is off when a message character is encoun
tered in the pattern, the fill character replaces the
pattern character in the result.
If the digit selector or significance starter is en
countered in the pattern with the significance indica
tor off and the source digit zero, the source digit is
considered nonsignificant, and the fill character re
places the pattern character. If a digit selector or
significance starter is encountered with either the
significance indicator on or with a nonzero decimal
source digit, the source digit is considered signifi
cant, is zoned, and replaces the pattern character in
the result.
Result Condition: All digits examined are tested for
the code
whether all source digits in the field contain zeros
are recorded in the condition code at the completion
of the editing operation.
The condition code is made
is zero, that is, when all source digits examined since
the last field separator are zeros. When the pattern
has no digit selectors or significance starters, the
source is not examined, and the condition code is
made
rator or when no digit selector or significance starter
is encountered beyond the last field separator.
When the last field edited is nonzero and the sig
nificance indicator is on, the condition code is made
1 to indicate a result field less than zero.
Decimal Instructions 151