Reserved Words
Reserved Words
- A reserved word is a word that has a predefined meaning and cannot be used as a user-defined name or identifier.
- These are required for the language's syntax and semantics, specifying how COBOL programs are structured and executed.
- Reserved words can be -
- Keywords
- Optional words
- Figurative constants
- Special character words
- Special registers
Reserved Word | Description |
---|---|
Keywords | A keyword is a reserved word that has a predefined meaning and purpose in the language.
They are essential elements in defining data, setting up conditions, controlling the flow of execution, and more. For example -
|
Optional words | Optional words are reserved words that do not affect the program's execution. They can be included in a sentence or statement to improve readability. For example -
|
Figurative constants | A figurative constant is a symbolic representation used to indicate specific constant values without specifying the actual value explicitly.
They provide a shorter way to represent common values or patterns. For example -
|
Special character words | Special character words are used for a special purpose. There are five types of special character words -
|
Special registers | Special registers represent storage areas generated by the compiler. Their primary use is to store information produced by specific COBOL components. For example -
|