COBOL Manual for TNS and TNS/R Programs
Language Elements
HP COBOL Manual for TNS and TNS/R Programs—522555-006
3-16
Literals
It is possible to define a collection of program elements such that even complete
qualification fails to establish uniqueness for some of their names. In this case, your
program can never reference these elements. To avoid this situation, follow these
rules:
•
Do not define two identical data-names subordinate to a data structure unless their
references can be made unique through qualification by intermediate data
structure names.
•
Do not define two identical record-names subordinate to any file-name.
Independent data items (level-77 items) and record items that are not files must
have unique names if they are to be referenced.
•
Do not associate two identical condition-names with the same data item. If a word
used as a condition-name is also used to identify another program element, then it
can be referenced if and only if the associated data item can be referenced.
•
Do not define two identical status condition-names within the same system-name
clause of the SPECIAL-NAMES paragraph. If a word used as a condition-name in
such a clause is also used to identify another program element, then the clause
must also include a unique mnemonic-name to serve as a reference qualifier.
•
Do not put two identical paragraph-names in the same section. If a word used as a
paragraph-name is also used to identify another program element, then it can be
referenced if and only if its section can be referenced. Sections must have unique
names if they are to be referenced.
•
Do not locate two identical text-names in the same COPY library.
Literals
A literal is a character-string that has a value implied by either of these:
•
An ordered set of characters that compose the literal
•
A figurative constant (a special type of reserved word)
Topics:
•
Numeric literals
°
Decimal Numeric Literals
°
Hexadecimal Numeric Literals
•
Nonnumeric literals
°
Simple Nonnumeric Literals
°
Hexadecimal Nonnumeric Literals
•
National Literals
•
Figurative Constants