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 ?
Nodynam' is compiler option in COBOL.
-
- Registered Member
- Posts: 21
- Joined: Mon Jan 18, 2016 8:16 am
- Robert Sample
- Global Moderator
- Posts: 1896
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Nodynam' is compiler option in COBOL.
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.
Also, if you're compiling a CICS program, you MUST use NODYNAM -- no option.
-
- Registered Member
- Posts: 16
- Joined: Mon Oct 27, 2014 8:30 am
Re: Nodynam' is compiler option in COBOL.
Nodynam means you are calling you program non-dynamically.
-
- Registered Member
- Posts: 22
- Joined: Thu Mar 17, 2016 9:54 pm
Re: Nodynam' is compiler option in COBOL.
So, how are we calling a program in main-program does not really matter and actually depends on the compiler option? Is this correct?
- Robert Sample
- Global Moderator
- Posts: 1896
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Nodynam' is compiler option in COBOL.
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)
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute