Introduction | The Grid Example |
This chapter describes the Coborbgen utility.
Support for CORBA within Server Express is provided by the Coborbgen utility.
The specific implementations that are currently supported are:
Coborbgen enables you to:
Coborbgen:
IDL is used by the ORB's IDL compiler to generate stubs that connect the wrapped COBOL code to the ORB.
IDL can also be used to enable components written in other languages supported by the ORB to interface to components that have been written in COBOL.
To use Coborbgen, you must install:
You can use ORBs to develop and deploy distributed applications written in different languages. ORBs can interoperate across a broad range of different hardware environments.
There are currently several leading ORBs on the market that are used by many major companies. The two that MERANT supports specifically are:
ORBs support:
To process your COBOL:
When you use the coborbgen command line utility to process one or more COBOL programs, the utility generates a series of files. Those files comprise:
There are specific examples provided to illustrate MERANT support for CORBA within Object COBOL:
Note: You should ensure that the COBOL you distribute has a well designed interface that is suitable for distribution.
Within the COBOL you distribute, all the callable entry points will be callable across the network. This includes the PROCEDURE DIVISION within all the programs you specify and also any ENTRY statements.
If, on the coborbgen command line, you use the option -client
to specify COBOL code that is to act as the client side of a client/server
relationship, then wrappers for the client side are also generated. In
addition, the generated makefile builds an executable ORB client component
and an executable ORB server component.
The coborbgen command line is as follows:
coborbgen filename1 [filename2 filename3 ...
filenamen] [options]
where:
filename1 [filename2 filename3 ...
filenamen]
are COBOL source filename(s)
options
] are:-orbix |
Generates support for Orbix. (This is the
default.) |
|
-visi |
Generates support for Visibroker. |
|
-cob option [-cob
option ..] |
COBOL compiler options that are passed to
coborbgen. Normally, you should not have to use this option. However, in some instances you may need to; for example, to specify a specific pre-processor that your COBOL code requires. Note: When using this option, take care. For example, your UNIX command line shell may strip off any quotes that you use. To prevent this happening, you could add appropriate preventive syntax by enclosing your entire -cob value in quotes. For example: -cob " ' currency-sign=="92" ' "
|
|
-make |
Directs coborbgen to generate a makefile
to build executables. |
|
-client c1 [c2 c3 ...] |
Passes the names of the COBOL source
modules that, when compiled and linked together, form the executable
client. If specified:
|
|
-v |
Verbose option. Issues command line
messages showing the progress of the coborbgen command. This also sets any verbose flags within the generated makefile. |
|
-debug |
Directs coborbgen to insert debugging code
into the generated server wrappers and to insert Animator options on the
COBOL compiler's command line within the generated makefile. When run, any components built with this flag set issue a text message with details for:
|
|
-Octet |
This option specifies that COBOL DBCS
types (PIC N and PIC G ) are to be handled as
arrays of octets. If not specified, the IDL wstring and
wchar types are used (This alternative to the default is
available because some products on some platforms do not handle the
wchar and wstring
IDL types.) |
In general, you can apply to CORBA the tests that you apply to your other applications. However, the distributed nature of a CORBA component means that there are extra considerations that you should take into account when testing.
It is recommended that you test your COBOL server logic on a local host before you add distribution logic to it. This testing should:
When testing a distributed component, it is recommended that you follow a procedure similar to that outlined below:
(Even if you are writing COBOL servers for access by components written in other languages, it can still prove profitable initially to write a COBOL client test harness to check out the server logic).
To test and debug a distributed component, use Animator:
-debug
.
Using this option ensures that the generated makefile uses the animate (-a
)
option when compiling the COBOL modules.
make -f test.mak test-s.rts |
: | Builds an RTS for your server called
test-s.rts |
make -f test.mak test-c.rts |
: | Builds an RTS for your client called
test-c.rts |
make -f test.mak rts |
: | Builds an RTS
for your server called test-s.rts and for your client
called test-c.rts |
+A
.
test-c
, use
test-c.rts
as follows:
test-c.rts test-c
Copyright © 2000 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
Introduction | The Grid Example |