Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

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.
  • Example:-
          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
    ZEROS
    ZEROES
    Denotes value 0, or one or more 0, based on the context
    SPACE
    SPACES
    Denotes one or more spaces or blanks
    HIGH-VALUE
    HIGH-VALUES
    Denotes the highest value in the collating sequence
    LOW-VALUE
    LOW-VALUES
    Denotes the lowest value in the collating sequence
    QUOTE
    QUOTES
    Denotes one or more single character (‘‘).
    ALL literal Denotes one or more of the string characters comprising the literal.






© copyright mainframebug.com
Privacy Policy