Jürgen Weber wrote:
Steve,

thanks very much for the exhaustive resume of cobol call options.

I am looking for a way to use dynamic and dlls calls together from one load
module. This is possible by linking with DYNAM and calling the DLL
explicitly with dllload. Of course, for DLLs that export lots of functions,
this means a lot of code. But the great advantage of DLLs is that you can
export more than one function and the system does the linkage. So with
dllload the DLL advantage comes at a high cost, not to forget, that you have to unload the DLL, too.

DLLs are overrated by people who are not aware of
how normal dynamic linkages work in z/OS. But one
must deal with them, since they are becoming more
and more common.

If you compile with NODYNAM, you can statically call
your DLL (CALL 'dllname') and dynamically call other
code (CALL dataname_item_containing_program_name).



So, I was looking into the second option given in http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG30/4.3.7.2?SHELF=&DT=20050628164603

I quote:

"Put the COBOL DLL programs that you want to call from the COBOL non-DLL
programs in the load module that contains the main program. Use static calls
from the COBOL non-DLL programs to call the COBOL DLL programs."

So, I guess this means you have to statically link a DYNAM linked cobol
program A to a DLL linked cobol program B together into a load module AB.

This should somehow require three link steps:

1) link A with DYNAM option
2) link B with DLL option
3) link the results of 1) and 2) statically together into AB

But, I don't know how to do that.

Thank you,
Jürgen

Be careful to distinguish between compile options and
bind options. As I understand your request, you should

1. compile B with DLL option and bind it with DLL option
   -use cob2 if you must; compile options specified in PROCESS
      statements in the code; bind options specified in the
      -b flag

2. compile A with NODYNAM, call your dll as CALL 'dll', bind
   with DLL option
   -use cob2 with SYSLIB being set up first to point to the
    directory containing B; the binder will automatically
    locate and include B

you do not _need_ a separate bind step if you do things
in that order.

Kind regards,

-Steve Comstock

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to