COBOL Manual for TNS and TNS/R Programs
Language Elements
HP COBOL Manual for TNS and TNS/R Programs—522555-006
3-23
Literals
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 3-5. Figurative Constants
Figurative Constant * What It Represents
ZERO[[E]S] One or more of the character zero (0), depending on the context
SPACE[S] One or more spaces, depending on the context
HIGH-VALUE[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 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)
LOW-VALUE[S] One or more of the character that has the lowest position in the
program collating sequence, except in the SPECIAL-NAMES
paragraph, where it 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)
QUOTE[S] One or more of the character quotation mark (")
You cannot use either of these words instead of quotation marks
to enclose a nonnumeric literal.
symbolic-character One or more of the character specified as the value of
symbolic-character in the SYMBOLIC CHARACTERS
clause of the SPECIAL-NAMES paragraph
ALL literal The value of literal must contain one or more of these:
•
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.