How do you declare a global variable in COBOL?

  • By declaring the variable in the FILE SECTION
  • By placing the variable in the WORKING-STORAGE section
  • By using the GLOBAL keyword in the VARIABLE clause
  • COBOL does not support global variables
In COBOL, global variables are declared in the WORKING-STORAGE section. This makes the variable accessible to all procedures within the program, ensuring a global scope.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *