In COBOL, how can you pass data between a calling program and a called subprogram?

  • By declaring global variables that can be accessed by both the calling program and the called subprogram.
  • By using the ACCEPT and DISPLAY statements.
  • By using the CALL statement without any additional clauses.
  • By using the LINKAGE SECTION in the called subprogram and the USING clause in the calling program.
Data can be passed between a calling program and a called subprogram in COBOL by defining a LINKAGE SECTION in the called subprogram and using the USING clause in the calling program. This ensures proper communication and sharing of data between the two program units.
Add your answer
Loading...

Leave a comment

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