Multiple choice technology mainframe

CALL 'PGMA' USING WS-XYX. Is this a static call or dynamic call?

  1. Always static

  2. Always dynamic

  3. Depends on compiler option

  4. Neither static nor dynamic

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

CALL 'PGMA' USING WS-XYX syntax alone doesn't determine static vs dynamic call. A static call (CALL literal) is bound at compile time, while a dynamic call (CALL identifier) uses a variable containing the program name. However, modern COBOL compilers can be configured (via compiler options like NODYNAM or DYNAM) to treat literal calls as either static or dynamic regardless of syntax.

AI explanation

In COBOL, CALL 'PGMA' USING ... with a literal program name is normally resolved as a static call at link-edit time. However, on IBM Enterprise COBOL and similar compilers, the DYNAM compiler option can force even literal-named calls to be resolved dynamically at run time (loading the program via the loader instead of binding it into the load module). So whether this specific call ends up static or dynamic genuinely depends on the compiler options (STATIC/DYNAM, NODYNAM, etc.) in effect at compile time, not just the call syntax alone — making 'Depends on compiler option' the most accurate answer, rather than 'always static' which is the common misconception.