IMO, for DLL support, the RENT compiler option is an absolute requirement;
it makes your Cobol load module reentrant (constructed reentrancy) and
does a lot of other things to the code generation, and DLL calls will not work
without this. LONGNAME is another prerequisite, IIRC ... same in PL/1.

The RENT linker option, OTOH, is sort of optional ... it tells the system, that
the module is reentrant and that parallel running tasks or subtasks may use
the same copy in storage concurrently (different from NORENT or REUS),
but the DLL calls will work, even if you don't mark your module as being RENT.

IMO, if you are not running your programs in a multitasking environment
(batch job only, for example), the DLL calls will internally do a LOAD of the DLL only once and then ... like explained in my other mail ... use machine instructions for
transfer of control. So there is not really a problem.

But, of course, it is better to specify RENT on the binder.

Kind regards

Bernd


Am 14.08.2021 um 01:16 schrieb Frank Swarbrick:
For our COBOL program binder step we've never specified the RENT (or REUS=RENT) option, even though 
we always use the RENT compiler option.  This has never seemed to cause us any problems.  I now see 
in the Enterprise COBOL manual, section "Compiling programs to create 
DLLs"(https://www.ibm.com/docs/en/cobol-zos/6.3?topic=application-compiling-programs-create-dlls),
 where it states "Applications that use DLL support must be reentrant. Therefore, you must 
compile them with the RENT compiler option and link them with the RENT binder option."  
However, I've been doing testing with DLLs recently and have never had any (noticeable?) issues 
even though we are not specifying RENT or REUS=RENT.

So what's up with this?  And what about for non-DLL dynamic calls?  I've had no 
issues there, either.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to