Page 1 of 1

Nodynam' is compiler option in COBOL.

Posted: Mon Aug 07, 2023 4:58 pm
by Abbey Tiwari
HI,

If we have used 'Nodynam' is compiler option but I am using dynamic call in pgm ....what will happen...subpgm will be called dynamically or it will not be called ?

Re: Nodynam' is compiler option in COBOL.

Posted: Mon Aug 07, 2023 11:10 pm
by Robert Sample
This seems like a pretty easy thing to test -- what happened when you tried it?

Also, if you're compiling a CICS program, you MUST use NODYNAM -- no option.

Re: Nodynam' is compiler option in COBOL.

Posted: Wed Aug 09, 2023 12:11 pm
by Rohit Jain
Nodynam means you are calling you program non-dynamically.

Re: Nodynam' is compiler option in COBOL.

Posted: Wed Aug 16, 2023 10:42 pm
by Sankar Sabari
So, how are we calling a program in main-program does not really matter and actually depends on the compiler option? Is this correct?

Re: Nodynam' is compiler option in COBOL.

Posted: Thu Aug 17, 2023 1:48 am
by Robert Sample
This is a complicated area, but you are not correct. From the Programming Guide for version 6.4 (with emphasis added by me):
DYNAM
Use DYNAM to cause nonnested, separately compiled programs invoked through the CALL literal
statement to be loaded for CALL, and deleted for CANCEL, dynamically at run time.
Note: The DYNAM option can be overridden for particular CALL statements by using the CALLINTERFACE
directive.
CALL identifier statements always result in a runtime load of the target program and are not affected by
this option.

DYNAM option syntax
NODYNAM
DYNAM
Default is: NODYNAM
Abbreviations are: DYN | NODYN
Restriction: The DYNAM compiler option must not be used in the following cases:
• COBOL programs that are processed by the CICS translator or the CICS compiler option
• COBOL programs that have EXEC SQL statements and are run under CICS or Db2 call attach facility
(CAF)
If your COBOL program calls programs that have been linked as dynamic link libraries (DLLs), you must
not use the DYNAM option. You must instead compile the program with the NODYNAM and DLL options.
Related tasks
“Making both static and dynamic calls” on page 534
“Choosing the DYNAM or NODYNAM compiler option” on page 496
Related references
“Conflicting compiler options” on page 334
CALLINTERFACE (Enterprise COBOL for z/OS Language Reference)