Module 3: COBOL Program structure
COBOL FIGURATIVE CONSTANTS
- Figurative constants have some fixed names and the compiler has the ability to recognize these names and sets the corresponding values in the object program.
MOVE ZERO TO EMP-COUNT.
- In above example, value ‘0’ will be moved to variable EMP-COUNT as compiler will recognizes ZERO and sets EMP-COUNT to ‘0’.
- Given below are list Figurative constants and their description:-
Figurative Constants Description ZERO
Denotes value 0, or one or more 0, based on the context SPACE
Denotes one or more spaces or blanks HIGH-VALUE
Denotes the highest value in the collating sequence LOW-VALUE
Denotes the lowest value in the collating sequence QUOTE
Denotes one or more single character (‘‘). ALL literal Denotes one or more of the string characters comprising the literal.