COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
associated data item. This happens prior to and independently of the application of any
JUSTIFIED clause for the data item.
• When you use a figurative constant whose source form does not include the word ALL with a
DISPLAY, STRING, STOP, or UNSTRING statement, the compiler generates exactly one
character.
• When you use a figurative constant whose source form does include the word ALL, there are
two possibilities:
◦ If a nonnumeric or national literal follows the word ALL, the compiler generates a string
having the length and value of the literal.
◦ If a nonnumeric or national literal does not follow the word ALL, the compiler generates
a string of exactly one instance of the character represented by the reserved word
(figurative constant) or the symbolic character that follows the word ALL.
• The length of a figurative constant in a concatenation expression is one.
The result of associating a figurative constant that represents a nonnumeric value with a numeric
or numeric-edited data item is defined only when the string the compiler generates from the figurative
constant contains only digit characters. In this case, the generated nonnumeric value has the
appearance of an integer whose length (in terms of the number of digits it contains) is the same
as the length of the associated data item.
Table 13 Figurative Constants
What It RepresentsFigurative Constant *
One or more of the character zero (0), depending on the contextZERO[[E]S]
One or more spaces, depending on the contextSPACE[S]
One or more of the character that has the highest position in the program
collating sequence, except in the SPECIAL-NAMES paragraph, where it
HIGH-VALUE[S]
represents the character that has the highest position in the ASCII character set
(the 256th character, which is all binary ones) or in the national character set
(default is hexadecimal FFFF)
One or more of the character that has the lowest position in the program
collating sequence, except in the SPECIAL-NAMES paragraph, where it
LOW-VALUE[S]
represents the character that has the lowest position in the ASCII character set
(the first character, the NUL, which is all binary zeros) or in the national
character set (default is hexadecimal 0000)
One or more of the character quotation mark (")You cannot use either of these
words instead of quotation marks to enclose a nonnumeric literal.
QUOTE[S]
One or more of the character specified as the value of symbolic-character
in the SYMBOLIC CHARACTERS clause of the SPECIAL-NAMES paragraph
symbolic-character
The value of literal must contain one or more of these:ALL literal
• A nonnumeric literal
• A national literal
• A symbolic-character
• One of the other reserved words previously defined as figurative constants
(except that you cannot precede an ALL literal form of figurative constant
with another ALL)
When literal is a nonnumeric literal or a national literal, this form implies
repetition of the literal’s value to the extent required by the context. For the
other cases, the word ALL is redundant and is used only for readability.
* Singular and plural forms are equivalent and can be used interchangeably.
Character-Strings 75










