COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

the appearance of the insertion character within the edited item value in the same position
as it appears in the character-string.
Here are some examples. The caret (^) in each source item is the decimal point location
from its PICTURE character-string.
Edited ResultPICTURESource Item
1234.56PIC 9999.991234^56
1.23456PIC 9.999991^23456
01.234560PIC 99.9999991^23456
23.4000PIC 99.9999123^4
12.34PIC 99.9912^345
Fixed insertion
The currency symbol and the editing sign control symbols (+, -, CR, DB) are the insertion
characters. Only one currency symbol and one of the editing control symbols can be
used in a PICTURE character-string. CR and DB represent two positions when counting
an item’s size. When used, they must be in the rightmost positions. When a plus (+) or
minus (-) is used, it must be in either the leftmost or rightmost character position to be
counted in the item’s size. When the currency symbol is used, it must be the leftmost
character, except when preceded by either a plus (+) or minus (-). Only one currency
symbol and only one of the editing sign control characters can be used in the same
PICTURE character-string. The result of fixed insertion editing is the appearance of the
insertion characters within the item value in the same positions as they appear in the
PICTURE character-string.
Table 34 Sign Control Symbols
Result
Negative Data ItemPositive or Zero Data ItemEditing Symbol
-++
-space-
CR2 spacesCR
DB2 spacesDB
Here are some examples of fixed insertion editing. The caret (^) in each source item is
the decimal point location from its PICTURE character-string.
Edited ResultPICTURESource Item
12.34+PIC 99.99+12^34
12.34-PIC 99.99+-12^34
+$12.34PIC +$99.9912^34
-$12.34PIC +$99.99-12^34
$12.34PIC $99.99-12^34
$12.34-PIC $99.99--12^34
$12.34PIC -$99.9912^34
-$12.34PIC -$99.99-12^34
200 Data Division