I'm compiling a COBOL program as a DLL in zOS using the compiler options PGMN(LM),DLL,EXPORTALL When I do this, it also forces the compile to be NODYNAM. In this context, is there some other parm I can use to force the CALLS to to other subprograms from this to be dynamic (i.e. resolved at run time). I know I can use the CALL variable-name approach to accomplish this, but I can't do this with system routines like DSNELI, the DB2 call interface.
Does the IMPORT option have something to do with this?
Thanks!
All DLL's must be complied with NODYNAM. This cannot be avoided. As you pointed out using NODYNAM does
not preclude dynamic program calls using the CALL var-name
approach. As long as you are using dynamic calls
to locally developed routines you will maintain all of the advantages of not having static linked modules in
your programs.
Be less concerned about static linked system modules such as CALL 'DSNELI'
. These are
stub programs that will dynamically load the appropriate language interface module at
run time. See Universal Language Interface.