When using the EXTERNAL clause in COBOL, how can you ensure variable visibility across different programs?

  • By declaring the variable as REDEFINES in each program
  • By declaring the variable in each program using the EXTERNAL clause
  • By using the ENTRY statement in the calling program
  • By using the GLOBAL clause along with the EXTERNAL clause
To ensure variable visibility across different programs, you can use the GLOBAL clause along with the EXTERNAL clause. This combination allows the variable to have global visibility, making it accessible across various program units.
Add your answer
Loading...

Leave a comment

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