COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Example 49 Numeric Edited Data Items
12 R-TOTAL-1 PIC ZZZ,ZZZ.99.
10 ITEM-PRICE PIC $999.
35 UNIT-PRICE PIC $$$9.
05 AMOUNT-OWED PIC 999CR.
10 AMOUNT-LEFT PIC ***99.
05 BACK-ORDERS PIC -99.
77 START-DATE PIC 99/99/99.
12 S-BLIVIT PIC +$99.99.
03 STARRED-X PIC ***.**.
77 SUM-X PIC --B---.---.
• National Data Items
An item is in the national category when its PICTURE character-string begins with N or n and
contains no editing symbols. A national data item is used for languages that are not represented
by roman letters and numbers, such as the Japanese Kanji alphabet. Special terminals and
keyboards are required to use national data items.
In general, you can use a national data item anywhere you can use an alphanumeric data
item. Exceptions are:
◦ In an ACCEPT statement with DATE, DAY, DAY-OF-WEEK, or TIME
◦ In a FILE STATUS clause of the SELECT statement
◦ In an INITIALIZE statement with a REPLACING phrase
◦ In an INSPECT statement
◦ In the PADDING clause of the SELECT statement
◦ In a RECEIVE-CONTROL paragraph
◦ In the SPECIAL-NAMES paragraph
◦ As the identifier in a CALL statement
◦ As the identifier in a CANCEL statement
◦ In comparison with a nonnational data item or nonnational literal
If national data items and national literals are used for items in a STRING statement (part-1,
delimiter, or result ) or an UNSTRING statement (delim-1, delim-2, result, or
delimstore ), all the items must be national data items or national literals.
If you use a VALUE clause with a national item, you must precede the value with N or n with
no space between N or n and the value. For example:
01 kanji-field PIC N(4) VALUE IS N"kanji-value"
where kanji-value is a Kanji literal.
• Editing Characters
Editing is done by inserting, suppressing, or replacing a character. Editing occurs when a
value is moved into a data item whose PICTURE character-string contains editing characters.
The primary purpose of editing is to easily transform data into reportable form.
The methods of editing are:
◦ Simple insertion
◦ Special insertion
198 Data Division










