Reserved words
A reserved word is a character-string with a predefined meaning in a COBOL source unit.
Reserved words are listed in Reserved words. There are five types of reserved words:
- Keywords
- Optional words
- Figurative constants
- Special character words
- Special registers
- Keywords
- Keywords are reserved words that are required within a given clause, entry, or statement. Within each format, such words appear in uppercase on the main path.
- Optional words
- Optional words are reserved words that can be included in the format of a clause, entry, or statement in order to improve readability. They have no effect on the execution of the program.
- Figurative constants
- See Figurative constants.
- Special character words
- There are five types of special character words, which are
recognized as special characters only when represented in single-byte characters:
- Arithmetic operators: + - / * **
- Relational operators: < > = <= >=
- Floating comment indicators: *>
- Pseudo-text delimiters in COPY and REPLACE statements: ==
See COPY statement and REPLACE statement.
- Compiler directive indicators: >>
See Compiler directives.
- Special registers
- See Special registers.