Which of the three actions
is determined by one or
following: the type of
byte, the state of the
indicator, and whether the
examined is zero.
takes place
more of the
the pattern
significance
source digit
Pattern Bytes: There are four types of
pattern bytes: digit selector, signif
icance starter, field separator, and
message byte. Their coding is as
follows:
Name Code
Digit selector0010 0000 Significance starter 0010 0001 Field separator 0010 0010 Message byte Any other
The detection of either a digit selector
or a significance starter in the pattern
causes an examination tobe made of the
significance indicator and of a source
digit. As a result, either the expanded
source digit or the fill byte, as appro
priate, is selected to replace the
pattern byte. Additionally, encounter
ing a digit selector or a significance
starter may cause the significance indi
cator to be changed.
The field separator identifies individ
ual fields in a multiple-field editing
operation. It is always replaced in the
result by the fill byte, and the signif
icance indicator is always off after the
field separator is encountered.
Message bytes in the pattern are either
replaced by the fill byte 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 Byte: The first byte of the
pattern is used as the fill byte. The
fill byte can have any code and may
concurrently specify a control function.
If this byte is a digit selector or
significance starter, the indicated
editing action is taken after the code
has been assigned to the fill byte.
Source Digits: Each time a digit selec
tor or significance starter is encount
ered in the pattern, a new source digit
is examined for placement in the pattern
field. Either the source digit is
disregarded, or it is expanded to the
zoned format, by appending the zone code
1111 on the left, and stored in place of
the pattern byte.
Execution is as if the source digits
were selected one byte at a time and as
if a source byte were fetched for
inspection only once during an editing
operation. Each source digit is exam-
ined only once for a zero value. The
leftmost four bits of each byte are
examined first, and the rightmost four
bits, when they represent a decimal
digit code, remain available for the
next pattern byte that calls for a digit
examination. When the leftmost four
bits contain an invalid digit code, a
data exception is recognized, and 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 encount
ered in the rightmost four bit
positions, these bits are not treated as
a decimal-digit code, and a new source
byte is fetched from storage when the
next pattern byte calls for a source
digit examination.
When the pattern contains no digit
selector or significance starter, no
source bytes are fetched and examined.
Significance Indicator: The signifi
cance indicator is turned on or off to
indicate the significance or nonsignif
icance, respectively, of subsequent
source digits or message bytes. Signif
icant source digits replace their corre
sponding digit selectors or significance
starters in the result. Significant
message bytes remain unchanged in the
result.
The significance indicator, by its on or
off state, indicates also the negative
or positive value, respectively, of a
completed source field and is used as
one factor in the setting of the condi
tion code.
The significance indicator is set to off
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.
The significance indicator is set to on
when a significance starter is encount
ered whose source digit is a valid deci
mal digit, or when a digit selector is
encountered whose source digit is a
nonzero decimal digit, provided that in
both instances the source byte does not
have a plus code in the rightmost four
bit positions.
In all other situations, the signif
icance indicator is not changed. A
minus sign code has no effect on the
significance indicator.
of an editing
is equal in
It is composed
bytes, and zoned
Result Bytes: The result
operation replaces and
length to the pattern.
of pattern bytes, fill
source digits.
If the pattern byte
and the significance
is a message byte
indicator is on,
Chapter 8. Decimal Instructions 8-7
is determined by one or
following: the type of
byte, the state of the
indicator, and whether the
examined is zero.
takes place
more of the
the pattern
significance
source digit
Pattern Bytes: There are four types of
pattern bytes: digit selector, signif
icance starter, field separator, and
message byte. Their coding is as
follows:
Name Code
Digit selector
The detection of either a digit selector
or a significance starter in the pattern
causes an examination to
significance indicator and of a source
digit. As a result, either the expanded
source digit or the fill byte, as appro
priate, is selected to replace the
pattern byte. Additionally, encounter
ing a digit selector or a significance
starter may cause the significance indi
cator to be changed.
The field separator identifies individ
ual fields in a multiple-field editing
operation. It is always replaced in the
result by the fill byte, and the signif
icance indicator is always off after the
field separator is encountered.
Message bytes in the pattern are either
replaced by the fill byte 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 Byte: The first byte of the
pattern is used as the fill byte. The
fill byte can have any code and may
concurrently specify a control function.
If this byte is a digit selector or
significance starter, the indicated
editing action is taken after the code
has been assigned to the fill byte.
Source Digits: Each time a digit selec
tor or significance starter is encount
ered in the pattern, a new source digit
is examined for placement in the pattern
field. Either the source digit is
disregarded, or it is expanded to the
zoned format, by appending the zone code
1111 on the left, and stored in place of
the pattern byte.
Execution is as if the source digits
were selected one byte at a time and as
if a source byte were fetched for
inspection only once during an editing
operation. Each source digit is exam-
ined only once for a zero value. The
leftmost four bits of each byte are
examined first, and the rightmost four
bits, when they represent a decimal
digit code, remain available for the
next pattern byte that calls for a digit
examination. When the leftmost four
bits contain an invalid digit code, a
data exception is recognized, and 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 encount
ered in the rightmost four bit
positions, these bits are not treated as
a decimal-digit code, and a new source
byte is fetched from storage when the
next pattern byte calls for a source
digit examination.
When the pattern contains no digit
selector or significance starter, no
source bytes are fetched and examined.
Significance Indicator: The signifi
cance indicator is turned on or off to
indicate the significance or nonsignif
icance, respectively, of subsequent
source digits or message bytes. Signif
icant source digits replace their corre
sponding digit selectors or significance
starters in the result. Significant
message bytes remain unchanged in the
result.
The significance indicator, by its on or
off state, indicates also the negative
or positive value, respectively, of a
completed source field and is used as
one factor in the setting of the condi
tion code.
The significance indicator is set to off
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.
The significance indicator is set to on
when a significance starter is encount
ered whose source digit is a valid deci
mal digit, or when a digit selector is
encountered whose source digit is a
nonzero decimal digit, provided that in
both instances the source byte does not
have a plus code in the rightmost four
bit positions.
In all other situations, the signif
icance indicator is not changed. A
minus sign code has no effect on the
significance indicator.
of an editing
is equal in
It is composed
bytes, and zoned
Result Bytes: The result
operation replaces and
length to the pattern.
of pattern bytes, fill
source digits.
If the pattern byte
and the significance
is a message byte
indicator is on,
Chapter 8. Decimal Instructions 8-7