COBOL Manual for TNS and TNS/R Programs
Data Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
7-59
PICTURE Clause
•
Data Item Size
A data item’s size is determined by the symbols of its PICTURE character-string.
Each A, B, N, X, Z, 9, zero (0), slash (/), comma (,), period (.), plus (+), minus (-),
asterisk (*), or currency symbol (usually the dollar sign ($)) counts as one
character position. CR or DB counts as two character positions. S is one character
only if the item is subject to a SIGN clause with a SEPARATE phrase.
S, V, CR, and DB cannot appear more than once in a single character-string.
Figure 7-2. Precedence Rules for PICTURE Symbols
Floating
Insertion
Symbols
Other
Symbols
cs = currency symbol
VST525.vsd
Non-
Floating
Insertion
Symbols
Second
Symbol
B0 / , .
+
–
cs
Z
*
Z
*
cs cs 9
A
X
SVPP
CR
DB
B
0
/
,
.
+ -
+ -
CR DB
cs
Z *
Z *
+ -
+ -
cs
cs
9
A X
S
V
P
P
Nonfloating
Insertion Symbols
Floating
Insertion Symbols
Other
Symbols
xxxxxx xxxxxxxxx x x
xxxxxx xxxxxxxxx x x
x xxxxx xx xx xxx x x x x
x xxxxx xx xx xxx x x x
xxxxx xx xxx
xxxxx xxx xxx xxx
xxxxx xxx xxx xxx
x
xxxxxx
xxxxx x x x x
x
x
xxxx x x
xxxxx x x
xx
xxxx x x
xxxxxx x x x
xxxxxx xx x x xxxxx
xxx
xx
xxxxx xxxxxxx
xxxx x
xx
xxxxx
x
x
xx x
+
–
+
–
+
–
First
Symbol