Is it possible to NOT REFERENCE called programs from your main program.

Our existing NET EXPRESS system has a MAIN program in in called REPORTS.CBL.

Within the program there are calls made to upward of 100 potential bespoke report 'sub-programs'.

In Visual COBOL I've found that these 'sub-programs' must be mentioned in the REFERENCES of the main program otherwise the sub program will fail to load when called.

The problem is is that it takes an increasing amount of time to complie the VC COBOL version of the MAIN program as all the sub-program references are added.

Thirty references takes 3 minutes. Sixty takes 6 minutes and 100 references takes almost 10 minutes just to compile the program then another several minutes while it 'thinks' about doing a debug (if requested to do so!!)

Is there a way of calling out to other programs (.dll built) WITHOUT referencing them within the MAIN program as this would be a big help if there is!

 

Parents
  • It is not neccessary to add a reference to projects that contain programs that the main program will be calling but you do have to make the entry points to these programs available at run-time.

    These calls then become "dynamic" calls instead of "static" calls where they are known at compile time.

    You can do so by setting the environment variable PATH or COBPATH to include the folder where the .DLLs are located.
    If the entry point that you are calling is not the name of the .DLL then you have to preload the .DLL so that the run-time can find the entry point.

    This can be done using several methods including:
    1.   set procedure-pointer to entry "dllname"
    2.   MFENTMAP
    3.   Preload section of the app.config file.

    I wrote a number of tutorials on this subject and added them to the knowledgebase.
    There is a tutorial for each of the different types of code that can be called, i.e, managed-->managed, managed-->native, native-->native, etc.

    Please see the following for detailed information:

    Tutorial on using CALL statement in managed .NET code.

     

Reply
  • It is not neccessary to add a reference to projects that contain programs that the main program will be calling but you do have to make the entry points to these programs available at run-time.

    These calls then become "dynamic" calls instead of "static" calls where they are known at compile time.

    You can do so by setting the environment variable PATH or COBPATH to include the folder where the .DLLs are located.
    If the entry point that you are calling is not the name of the .DLL then you have to preload the .DLL so that the run-time can find the entry point.

    This can be done using several methods including:
    1.   set procedure-pointer to entry "dllname"
    2.   MFENTMAP
    3.   Preload section of the app.config file.

    I wrote a number of tutorials on this subject and added them to the knowledgebase.
    There is a tutorial for each of the different types of code that can be called, i.e, managed-->managed, managed-->native, native-->native, etc.

    Please see the following for detailed information:

    Tutorial on using CALL statement in managed .NET code.

     

Children
No Data