|
From: David E. <de...@us...> - 2005-05-28 19:52:50
|
Burke Cabaniss wrote: > I can compile and run programs with htcobol. My question is about COBOL > programs that CALL my other COBOL programs. I do not know about linking > of executables, and am asking about general direction. > > I have about 30 large COBOL programs that run in a combination process. > Some are CALL'ed and return, and some do not return. They "link" in my > old terminology. The latter progressively and selectively CALL other of > the programs. The COBOL I use has a "CALL PROGRAM [name]" statement that > works like a CALL and then a CANCEL (of the caller). The COBOL I use > finds programs by name in an object file directory, with no special > "library" setup. Some COBOL compilers can create executables or special objects. The executables can be run from the command line. The 'special objects' are run using a special program which loads and then executes it (ex. COBOL object-name). This special program is really just a program linked with the COBOL run-time. The special objects are really just shared libraries (DLL's on Win32). Or as some people refer to them, modules. At this time, TC does not have this special program. But TC (GCC) can create binary objects, executables, libraries (shared and static). > I believe I want to put all of these programs in one or two dynamic link > libraries. If two, one would be for "standard" functions that always > return to the caller. If this is the right direction, please confirm. I > can get the details of building dll's. What I would do is create a library, with the "standard" functions that always return to the caller. For COBOL sources that do not return to the caller, I would create an executable for each one. For programs which call other COBOL programs, but do not return, you can use one of the 'exec*' C function call. Hope this helps. LINK: Perl Meets COBOL - A must read for main-frame programmers http://www.perl.com/pub/a/2000/05/cobol.html |