Document revision date: 15 July 2002
|
|
|
|
COM, Registry, and Events for OpenVMS Developer's
Guide
3.2.1 How COM for OpenVMS Uses the OpenVMS Registry
COM for OpenVMS requires the OpenVMS Registry. Like its registry database
counterpart on Windows NT systems, the OpenVMS Registry stores
information about COM applications---specifically those COM
applications running on OpenVMS. These COM for OpenVMS applications use
the OpenVMS Registry to store CLSIDs (class IDs), startup information,
security settings, and so on in the OpenVMS Registry database. COM for
OpenVMS uses the Win32 APIs implemented on OpenVMS to read and write
this information to the OpenVMS Registry.
COM for OpenVMS requires access to the OpenVMS Registry database. If COM
for OpenVMS cannot access the OpenVMS Registry, COM for OpenVMS will not
start. For more information about the OpenVMS Registry, see Chapter 12.
3.3 Using COM for OpenVMS
You can use COM for OpenVMS to do the following:
- Develop new COM for OpenVMS COM applications
- Encapsulate existing applications for use with COM for OpenVMS
The following sections discuss new application development and
encapsulation in more detail.
An example of a COM application to encapsulate an existing OpenVMS
application is included with this release. The example can be found in
DCOM$EXAMPLES:[WRAPPER]. A README file describes the example and how to
build it.
3.3.1 Developing New Applications
Your organization might use COM for OpenVMS to develop new applications
under the following circumstances:
- You want to share data between an OpenVMS server and Windows NT
clients in a two-tier client/server computing model.
- You want to share data and to place business logic in the middle
tier of a three-tier computing environment.
For example, you might
have a Windows NT system as the client so you can take advantage of
its graphical user interface. You could write business logic as a
collection of COM objects on a middle-tier server; while the third-tier
large-capacity, high-availability OpenVMS server provides database
access.
- You want to share data between one or more OpenVMS systems or
between OpenVMS and other non-Windows systems using COM.
The advantages of using COM for OpenVMS include:
- COM for OpenVMS provides a good programming model for programmers
with C++ and object-oriented programming skills.
- COM for OpenVMS provides multivendor interoperability. COM is a
standard with implementations available on a number of platforms today,
and ports for additional platforms are in development.
- The COM for OpenVMS run-time provides automated data marshaling and
unmarshaling.
- COM provides OLE Automation services to support communications with
Microsoft Visual Basic® applications. Visual Basic is a very
popular programming environment for client/server computing.
- COM provides version support for components so you can upgrade
applications over time without breaking existing environments.
See Chapter 7 and Appendix C for examples of developing COM for
OpenVMS applications.
3.3.2 Encapsulating Existing Applications
If you have monolithic applications written in procedural languages
(such as Fortran and COBOL) with character-cell interfaces, you can put
a COM "wrapper" or jacket around these applications to allow
them either to run on new platforms or to remain on OpenVMS and run in
a client/server environment.
The risk associated with completely reengineering some older
applications is high. Many applications are large, complex, poorly
documented, and not well understood by their current maintainers.
Encapsulating a legacy application can be less risky than reengineering
and can be the first step in a rewrite. Over time, pieces of the legacy
application can be rewritten, while the older version of the
application remains stable and available. Encapsulation also allows
developers to reuse code, saving time and resources.
Disadvantages to encapsulation include more complex maintenance efforts
and the inability to make changes to the underlying code. If the legacy
application was unstable or hard to maintain, the encapsulated
application will not be any better, and might be made worse because of
the wrapper.
There are several layers of a traditional procedural application that
you can encapsulate: the user interface (UI), the database, and the
data manipulation routines.
- User interface
If you choose to encapsulate the user interface,
the UI could be supported on some other platform (for example, from a
graphical user interface [GUI] on a Windows NT system).
Encapsulating and moving the UI to the user's desktop can mean that
the rest of the application remains on OpenVMS. Batch processing
programs are well suited to user interface encapsulation. Applications
that do screen management (for example, SMG or FMS) could have their
older character-cell interface encapsulated using COM for OpenVMS,
providing users access through newer Windows NT style dialog boxes.
- Database
If you choose to encapsulate a database using COM for
OpenVMS, the database could be accessed from parts of a distributed
application running on other platforms. The advantage of this approach
is that the programmer can keep the database on OpenVMS (a stable,
24x365 system), while the user interface and data access routines are
on remote (and perhaps less reliable) systems.
- Database manipulation routines
If you choose to encapsulate the
database manipulation routines, the routines could be accessed from any
other COM component in a heterogeneous computing environment.
Encapsulating an OpenVMS application using COM for OpenVMS means that
you write a COM for OpenVMS server that talks to the application being
encapsulated. The COM for OpenVMS server passes arguments to the
application in the order and format that the application expects. The
COM for OpenVMS server then intercepts the output from the application
and directs it to the display device, user interface, or other routines.
Chapter 4
Installing the COM for OpenVMS Kit
This chapter provides a list of the contents of the COM for OpenVMS
kit, a list of prerequisite software, and preinstallation requirements.
It also describes how to install COM for OpenVMS and includes
postinstallation instructions.
4.1 Contents of the COM Version 1.2 for OpenVMS Kit
COM Version 1.2 for OpenVMS contains the following:
- Software
- COM for OpenVMS run-time libraries
- COM for OpenVMS MIDL compiler and header files
- COM for OpenVMS configuration utilities
- Active Template Library Version 3.0
- Sample applications
- Documentation
- COM, Registry, and Events for OpenVMS Developer's Guide (in PostScript, HTML, and PDF formats)
4.2 Prerequisites
The following software is required:
- For OpenVMS systems
- OpenVMS Version 7.2-1 or higher
- For COM for OpenVMS application development:
Compaq C++ Version 6.0 or higher
To build ATL applications on
OpenVMS:
Compaq C++ Version 6.2-016 or higher
- Compaq TCP/IP Services for OpenVMS Version 5.0 or equivalent
- Compaq DECwindows Motif for OpenVMS (see Section 4.2.1)
- Compaq Advanced Server for OpenVMS Version 7.3 or higher
(Compaq Advanced Server for OpenVMS is not
required if you are running COM for OpenVMS in unauthenticated mode.)
- Before installing COM for OpenVMS check that you have the required
free global pages, global sections, and disk blocks. The following
table lists the requirements.
Software |
Global pages |
Global sections |
Disk blocks |
COM for OpenVMS
|
11,000
|
27
|
57000
|
RPC Runtime
|
3,300
|
14
|
N/A
|
For Advanced Server requirements: See the Compaq Advanced Server for OpenVMS Server
Installation and Configuration Guide.
For TCP/IP requirements: See the Compaq TCP/IP Services for
OpenVMS Installation and Configuration document.
- For Windows NT systems
- Windows NT 4.0 with Service Pack 3 or higher installed
- Microsoft Visual C++ or Visual Basic (for Windows NT client
development and information about MIDL compiler). See the Microsoft
website for compiler version requirements.
- TCP/IP enabled (needed for OpenVMS connectivity)
4.2.1 DECwindows Motif Required to Run COM for OpenVMS
You must install DECwindows Motif for OpenVMS on any system running COM
for OpenVMS. If you already have DECwindows Motif installed on your
system, you do not need to do anything else. If you do not have
DECwindows Motif installed on your system, you can find the
installation kit for DECwindows Motif on the OpenVMS CD-ROM in the
[KITS.DWMOTIFxxx_KIT]
directory, where xxx is a DECwindows Motif version, such as
125 or 126.
Note
If you are installing DECwindows Motif to meet the COM for OpenVMS
requirements only, you do not need the DW-MOTIF license.
|
4.3 Supported COM for OpenVMS Installations
The following sections describe COM Version 1.2 for OpenVMS
installation and upgrade options.
Note
If you want to run COM Version 1.2 for OpenVMS in unauthenticated mode,
see Section E.1.
|
If you want to do this |
Read this section |
Install COM for OpenVMS on an OpenVMS standalone system for the first
time.
|
Section 4.4
|
Install COM for OpenVMS on an OpenVMS Cluster system for the first time.
|
Section 4.6
|
Upgrade from earlier versions of COM for OpenVMS on an OpenVMS
standalone system.
|
Section 4.5
|
Upgrade from earlier versions of COM for OpenVMS on an OpenVMS Cluster
system.
|
Section 4.7
|
4.4 Installing COM for OpenVMS on an OpenVMS Standalone System
Use the following procedure:
- Install OpenVMS Version 7.2-1 or higher. For this procedure, see
the OpenVMS Alpha Version 7.x Upgrade and Installation Manual.
- Install TCP/IP Services. For this procedure, see the Compaq
TCP/IP Services for OpenVMS Installation and Configuration manual
or your TCP/IP supplier's documentation.
- Boot the installed system from the system disk.
- Install COM Version 1.2 for OpenVMS. For this procedure, see
Section 4.9.
- Install Compaq Advanced Server for OpenVMS. For this procedure, see the Compaq
Advanced Server for OpenVMS Server Installation and Configuration
Guide.
- Configure TCP/IP Services (set up for startup and reboot); then
start TCP/IP. You must configure the PWIP driver for Compaq Advanced Server for OpenVMS to
use TCP/IP Services. For information about configuring TCP/IP, see the
Compaq TCP/IP Services for OpenVMS Installation and Configuration
manual or your TCP/IP supplier's documentation.
- Configure the OpenVMS Registry as follows:
- Run
REG$CONFIG.COM
to configure the OpenVMS Registry. See Section 13.2.
- Edit the
SYLOGICALS.COM
file to define the
SYS$REGISTRY
logical as follows:
$ DEFINE/SYSTEM SYS$REGISTRY directory-specification
|
- Start OpenVMS Registry by running the
REG$STARTUP.COM
file.
- If you want to run DCE, start DCE now.
Note
You do not need DCE to run COM for OpenVMS, but if your environment
uses DCE, Compaq recommends that you start DCE now.
|
For this procedure, see the Compaq DCE Installation and
Configuration Guide.
For more information about OpenVMS
external authentication, see Section 5.1.
- Configure Compaq Advanced Server for OpenVMS. You need to reboot to finish Compaq Advanced Server for OpenVMS
configuration. You must reboot 0 to n times, depending on your
system configuration. For this procedure, see the Compaq Advanced
Server for OpenVMS Server Installation and Configuration Guide.
- Start Compaq Advanced Server for OpenVMS (set up for startup on reboot). For this
procedure, see the Compaq Advanced Server for OpenVMS Server
Installation and Configuration Guide.
- Start the ACME server. Use the following command:
$ @SYS$STARTUP:NTA$STARTUP_NT_ACME
|
- Start RPC. Use the following command:
$ @SYS$STARTUP:DCE$RPC_STARTUP.COM
|
- Configure COM for OpenVMS. For this procedure, see Section 4.10
and Section 6.2.
- Populate the OpenVMS Registry. For this procedure, see Section 6.2.
Use option 3 to populate the OpenVMS Registry database.
- Create any OpenVMS and Compaq Advanced Server for OpenVMS accounts needed by the COM for
OpenVMS Service Control Manager. For more information, see
Section 6.2. Use option 8 to create the accounts.
- Edit the
SYLOGICALS.COM
file and add the following line:
$ DEFINE DCOM$TO_BE_STARTED TRUE
|
- Start COM for OpenVMS. For this procedure, see Section 4.11.
4.5 Upgrading COM for OpenVMS on an OpenVMS Standalone System
Note
Before you start, Compaq recommends that you disable any Compaq Advanced Server for OpenVMS,
OpenVMS Registry, and layered product automatic startups so that these
products do not start until you have upgraded COM for OpenVMS and its
associated components.
Use the following procedure:
- Edit the
SYLOGICALS.COM
file to stop the following products from starting:
- OpenVMS Registry (remove the line
DEFINE REG$TO_BE_STARTED TRUE
or
DEFINE/SYSTEM REG$TO_BE_STARTED TRUE
)
- COM for OpenVMS (comment the line
DEFINE DCOM$TO_BE_STARTED TRUE
)
- Edit the
SYS$STARTUP:SYSTARTUP_VMS.COM
file to stop the following products from starting:
- Compaq Advanced Server for OpenVMS (comment the line
@SYS$STARTUP:PWRK$STARTUP.COM
).
If COM for OpenVMS is currently running, shut down COM for OpenVMS
first, Compaq Advanced Server for OpenVMS (if running), and then the OpenVMS Registry.
|
Use the following procedure:
- Upgrade to OpenVMS Version 7.2-1 or higher. For this procedure, see
the OpenVMS Alpha Version 7.x Upgrade and Installation Manual.
- If you need to upgrade TCP/IP, upgrade TCP/IP now. For this
procedure, see the Compaq TCP/IP Services for OpenVMS Installation
and Configuration manual or your TCP/IP supplier's documentation.
- Boot the upgraded system from the system disk.
- Upgrade COM for OpenVMS. For this procedure, see Section 4.9.
- Install or upgrade Compaq Advanced Server for OpenVMS. You must reboot 0 to n
times, depending on your system configuration. For this procedure, see
the Compaq Advanced Server for OpenVMS Server Installation and
Configuration Guide.
- Start TCP/IP unless you have enabled TCP/IP to start on a reboot.
For this procedure, see the Compaq TCP/IP Services for OpenVMS
Installation and Configuration manual or your TCP/IP supplier's
documentation.
- Start the OpenVMS Registry unless you have enabled the OpenVMS Registry
to start on a reboot. For this procedure, see Section 13.2.
- If you want to run DCE, start DCE now.
Note
You do not need DCE to run COM for OpenVMS, but if your environment
uses DCE, Compaq recommends that you start DCE now.
|
For this procedure, see the Compaq DCE Installation and
Configuration Guide.
For more information about OpenVMS
external authentication, see Section 5.1.
- Configure Compaq Advanced Server for OpenVMS. You must reboot to finish Compaq Advanced Server for OpenVMS
configuration. You need to reboot 0 to n times, depending on
your system configuration. For this procedure, see the Compaq
Advanced Server for OpenVMS Server Installation and Configuration
Guide.
- Start Compaq Advanced Server for OpenVMS (set up for startup on reboot). For this
procedure, see the Compaq Advanced Server for OpenVMS Server
Installation and Configuration Guide.
- Start the ACME server. Use the following command:
$ @SYS$STARTUP:NTA$STARTUP_NT_ACME
|
- Start RPC. Use the following command:
$ @SYS$STARTUP:DCE$RPC_STARTUP.COM
|
- See Appendix D for detailed information about upgrading from COM
Version 1.0 for OpenVMS to COM Version 1.2 for OpenVMS.
- Configure COM for OpenVMS. For this procedure, see Section 4.10
and Section 6.2.
- Populate the OpenVMS Registry. For this procedure, see Section 6.2.
Use option 3 to populate the OpenVMS Registry database.
- Create any OpenVMS and Compaq Advanced Server for OpenVMS accounts needed by the COM for
OpenVMS Service Control Manager. For more information, see
Section 6.2. Use option 8 to create the accounts.
- Edit the
SYLOGICALS.COM
file and add the following line:
$ DEFINE DCOM$TO_BE_STARTED TRUE
|
- Start COM for OpenVMS. For this procedure, see Section 4.11.
4.6 Installing COM for OpenVMS on an OpenVMS Cluster
Note
This cluster installation procedure assumes you are installing COM for
OpenVMS on a single system disk.
|
Use the following procedure:
- Install OpenVMS Version 7.2-1 or higher on all system disks as
required. For this procedure, see the OpenVMS Alpha Version 7.x
Upgrade and Installation Manual.
- Install TCP/IP. For this procedure, see the Compaq TCP/IP
Services for OpenVMS Installation and Configuration manual or your
TCP/IP supplier's documentation.
- Boot the installed system from the system disk.
- Install COM Version 1.2 for OpenVMS. For this procedure, see
Section 4.9.
- Install Compaq Advanced Server for OpenVMS on this node in the cluster. For this
procedure, see the Compaq Advanced Server for OpenVMS Server
Installation and Configuration Guide.
Note
You must install Compaq Advanced Server for OpenVMS on at least one Alpha node in the
cluster. On the other nodes, you can either install Compaq Advanced Server for OpenVMS or
select
External Authentication images (only)
.
|
- Configure TCP/IP (set up for startup on reboot on each node) and
start TCP/IP. You must configure the PWIP driver for Compaq Advanced Server for OpenVMS to
use TCP/IP. For information about configuring TCP/IP, see the
Compaq TCP/IP Services for OpenVMS Installation and
Configuration manual or your TCP/IP supplier's documentation.
- Configure the OpenVMS Registry:
- Run
REG$CONFIG.COM
to configure the OpenVMS Registry. You need to configure the OpenVMS Registry
only once for the cluster. See Section 13.2.
- Set the
SYS$REGISTRY
logical to
DEFINE/SYSTEM
on every Alpha node in the cluster that will run the OpenVMS Registry
server.
- Edit the
SYLOGICALS.COM
file on every node in the cluster as follows:
- If the cluster uses a single, cluster-common
SYLOGICALS.COM
file that is called by each node's
SYLOGICALS.COM
file, you do not need to make any changes.
- On those nodes where you do not want the OpenVMS Registry server to
run, add the following line to the
SYLOGICALS.COM
file:
$ DEFINE/SYSTEM REG$TO_BE_STARTED FALSE
|
Compaq Advanced Server for OpenVMS requires that the OpenVMS Registry be running on a node
in the cluster.
- Configure DCE.
Note
You do not need DCE to run COM for OpenVMS, but if your environment
uses DCE, Compaq recommends that you start DCE now.
|
For this procedure, see the Compaq DCE Installation and
Configuration Guide.
- If you want to run DCE, start DCE now. You must configure DCE on
each node on which you want to run DCE.
For more information about
OpenVMS external authentication, see Section 5.1.
- Configure and start Compaq Advanced Server for OpenVMS. For this procedure, see the
Compaq Advanced Server for OpenVMS Server Installation and
Configuration Guide.
If this node is running Compaq Advanced Server for OpenVMS,
set up Compaq Advanced Server for OpenVMS for startup on reboot (edit the SYS$STARTUP file
as necessary). You must reboot 0 to n times as needed,
depending on your system configuration.
If this node is not running
Compaq Advanced Server for OpenVMS, edit the
SYLOGICALS.COM
file and define the
PWRK$ACME_SERVER
logical. For this procedure, see the Compaq Advanced Server for
OpenVMS Server Installation and Configuration Guide. For more
information about the
PWRK$ACME_SERVER
logical, see Table 8-2.
- Start the ACME server. Use the following command:
$ @SYS$STARTUP:NTA$STARTUP_NT_ACME
|
- Start RPC. Use the following command:
$ @SYS$STARTUP:DCE$RPC_STARTUP.COM
|
- Configure COM for OpenVMS. For this procedure, see Section 4.10
and Section 6.2.
- Populate the OpenVMS Registry. For this procedure, see Section 6.2.
Use option 3 to populate the OpenVMS Registry database. You need to
populate the OpenVMS Registry only once in a cluster.
- Create any OpenVMS and Compaq Advanced Server for OpenVMS accounts needed by the COM for
OpenVMS Service Control Manager. For more information, see
Section 6.2. Use option 8 to create the accounts. You need to create
these accounts only once in a cluster.
- Edit the
SYLOGICALS.COM
file and add the following line:
$ DEFINE DCOM$TO_BE_STARTED TRUE
|
- Start COM for OpenVMS. For this procedure, see Section 4.11.