3) What compiler option would you use for dynamic linking?
-
DYNM
-
NDYNAM
-
DYNA
-
DYNAM
The DYNAM compiler option enables dynamic linking in IBM COBOL, allowing subprograms to be loaded and called at runtime rather than statically bound. Options DYNM, NDYNAM, and DYNA are invalid compiler options. Dynamic linking is useful when subprograms may change or when memory management requires flexible loading strategies.
In COBOL compilers (e.g., IBM Enterprise COBOL), the DYNAM compiler option specifies that CALL statements to subprograms be resolved dynamically at run time rather than statically bound at link-edit/compile time — this enables dynamic linking, where the called module is loaded on demand from a library (e.g., a load library) rather than being bound into the calling program's load module. The other listed strings ('DYNM', 'NDYNAM', 'DYNA') are not valid COBOL compiler options — NDYNAM in particular would suggest the negation but isn't the real option name (the real negation is NODYNAM). DYNAM is the correct, real option.