Significance
Indicator Location
Pattern Digit (Before/After) Rule1000-lOOC b off/off leave(l) bdd,d(d.ddbCR d 0 off/off fill bbd,d(d.ddbCR d 2 off/on(2) digit bb2,d(d.ddbCR 1 on/on leave same
d 5 on/ondigit bb2,5(d.ddbCR ( 7 on/on digit bb2,57d.ddbCR d 4 on/on digit bb2,574.ddbCR . on/on leave same
d 2 on/ondigit bb2,574.2dbCR d 6+ on/off(3) digit bb2,574.26bCR b off/off fill same C off/off fill bb2,574.26bbR
R off/off fill bb2,574.26bbb
Notes:
1. This characteris the fill byte.
2. First nonzero decimal source digit turns on significance
indicator.3. Plus sign in the four rightmost bits of the byte turns
off significance indicator.
Thus, after the instructionis executed,
the pattern field contains the result as
follows:
Pattern1000 100C 140140lF216BIF51F71F414BIF21F61401401401 b b 2 574 2 6 b b b
This pattern field prints as:
2,574.26
The source field remains unchanged.Condition code 2 is set because the
number was greater than zero.
If the numberin the source field is
changed to the negative number00 00 02 6D and the original pattern is used, the
edited result this time is:
Pattern1000 100C 140140140140140140lFol4BlF21F6140lC31D91 b b b b b b 0 2 6 b C R
This pattern field prints as:0.26 CR The significance starter forces the
significance indicator to the on state
and hence causes a leading zero and the
decimal point to be preserved. Because
the minus-sign code has no effect on the
significance indicator, the charactersCR are printed to show a negative (cred
it) amount.Condition code 1 is set (number less
than zero).
EDITAND MARK (EDMK)
The EDITAND MARK instruction may be
used, in addition to the functions of
EDIT, to insert a currencysymbol, such
as a dollarsign, at the appropriate
position in the edited result. Assume
the same sourcein storage locations 1200-1203, the same pattern in locations 1000-100C, and the same contents of
general register 12 as for the EDIT
instruction above. The previous
contents of general register 1 (GR1) are
not significant; aLOAD ADDRESS instruc
tion is used to set up the first digit
position that is forced to print if no
significantdigits occur to the left.
The instructions:
LA1,6(0,12) Load address of
forced significant
digit into GR1
EDMK0(13,12),X'200'(12) leave address
of first signif
icant digit in GR1BCTR 1,0 Subtract 1 from
addressin GRl
MVIO(l),C'$' Store dollar sign
at address in GR1
produce the following results for the
two examples under EDIT:
Appendix A. Number Representation and Instruction-Use Examples A-33
Indicator Location
Pattern Digit (Before/After) Rule
d 5 on/on
d 2 on/on
R off/off fill bb2,574.26bbb
Notes:
1. This character
2. First nonzero decimal source digit turns on significance
indicator.
off significance indicator.
Thus, after the instruction
the pattern field contains the result as
follows:
Pattern
This pattern field prints as:
2,574.26
The source field remains unchanged.
number was greater than zero.
If the number
changed to the negative number
edited result this time is:
Pattern
This pattern field prints as:
significance indicator to the on state
and hence causes a leading zero and the
decimal point to be preserved. Because
the minus-sign code has no effect on the
significance indicator, the characters
it) amount.
than zero).
EDIT
The EDIT
used, in addition to the functions of
EDIT, to insert a currency
as a dollar
position in the edited result. Assume
the same source
general register 12 as for the EDIT
instruction above. The previous
contents of general register 1 (GR1) are
not significant; a
tion is used to set up the first digit
position that is forced to print if no
significant
The instructions:
LA
forced significant
digit into GR1
EDMK
of first signif
icant digit in GR1
address
MVI
at address in GR1
produce the following results for the
two examples under EDIT:
Appendix A. Number Representation and Instruction-Use Examples A-33