Multiple choice technology mainframe

To use a variable from a main progam in the sub program

  1. it should be defined as GLOBAL

  2. should be included in the linkage section

  3. Both a and b

  4. Cannot be used

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In COBOL and similar mainframe languages, sharing variables between main and sub programs typically involves both: (1) defining variables appropriately (sometimes as GLOBAL or external), and (2) including them in the LINKAGE SECTION for parameter passing. The exact mechanism depends on the language and call method.