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.
Loading...
Related Quiz
- You are developing a COBOL program to read data from a file sequentially. Which file control verb should you use to open the file?
- What is the key difference between the REDEFINES clause and the RENAMES clause in COBOL?
- Which file organization type is best suited for situations where records are frequently added and deleted?
- In COBOL, what is the primary purpose of the INVALID KEY phrase when using the READ verb?
- Which section of a COBOL program includes the program's logic and calculations?