Microsoft’s COM (Component Object Model) is a specification by which development environments can create and use common modules in the Microsoft Windows environment. These modules share a standard set of data types and a common programming interface. This allows modules written in Microsoft Visual Basic or Visual C++ (for example) to utilize modules written in NetCOBOL or vice-versa.
Examples of COM technologies include Microsoft’s OLE (object Linking and Embedding) and the later replacement for OLE known as ActiveX
COM-enabled development environments generally require that you program using an object-oriented methodology. We will discuss this a bit later in this manual.
Fujitsu’s PowerCOBOL graphical user interface (GUI) development environment allows users to create single-threaded graphical COM components (typically referred to as “controls”). It does not currently support the creation of multi-threaded COM controls, however.
One of the advantages of using PowerCOBOL to create COM components (controls) is the fact that you are not required to learn object-oriented COBOL programming skills and design. PowerCOBOL allows you to create these modules by programming in traditional procedural COBOL, with a few exceptions.
You may use PowerCOBOL to create any graphical COBOL COM controls that you might require. You should refer to the Fujitsu PowerCOBOL documentation for information on how to create these types of controls. Note that when you use PowerCOBOL to create graphical COM controls, there is additional overhead required to support these in the form of the PowerCOBOL runtime system.
This manual is dedicated to creating non-graphical COBOL COM components using the NetCOBOL development environment. It will not touch on PowerCOBOL any further.
COM components created using Fujitsu’s NetCOBOL development environment require that the base client runtime support files be installed on any client machine you may wish to distribute them to. The NetCOBOL development environment already includes these files so there is no need to install the client runtime system on a machine containing such. In fact, you should not attempt to install the NetCOBOL client runtime on a machine already containing the NetCOBOL development environment.
COBOL COM components can be built to use Fujitsu’s royalty free single-threaded COBOL runtime system or Fujitsu’s non-royalty free multi-threaded runtime system.
This manual will illustrate how to create both single and multi- threaded COBOL COM components. In most cases, single- threaded COBOL COM components will work fine in your applications. In other cases, such as running on high transaction processing web servers, you may wish to purchase a multi-threaded runtime license from Fujitsu for higher performance and better compatibility. Contact your Fujitsu sales representative or visit NetCOBOL’s web site at http://www.adtools.com for details.
The following discussion is intended as a brief introduction to object-oriented terminology. If you are already familiar with OO terminology, you may wish to skip this discussion.