Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Using 'Call' in Method

$
0
0

Hi Juan,

You can call programs within other projects by adding a reference to those other projects within the calling project.

A single Winform application should only have one main project that is created using the Winform application template as this will compile as an .EXE. The other projects that it calls should be created using the Class Library template which will compile as a .DLL.

You can then issue a call prog-name from the main .EXE to a COBOL program that exists in the .DLL as long as you have a reference to that .DLL. You can add a project reference by right clicking on the references folder under the main project name in solution explorer and selecting the .DLL project.

If you have other ..DLL projects that contain programs that you need to call and they are not within the same solution then you can add a reference to them in the same manner but instead of adding a project reference you would browser to the actual .DLL location.

Note that the CALL statement is only used to call COBOL procedural programs. If you wish to run another winform you would create a new instance of it and then invoke its methods. These forms can exist in other class library projects as long as you have a reference to them.

In short, you do not actually call projects or solutions but you call the programs that exist within them. You can call a COBOL program just like you normally would passing parameters through CALL USING and then using a linkage section in the subprogram.

If you can provide more detail as to what exactly it is that you are trying to do then perhaps I can provide a small demo to get you started in the right direction.

Thanks.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>