Skip to main content

This article provides instructions for removing Server Express from a machine, while leaving an installation of Server for COBOL in place.

Problem:

Background information: Micro Focus COBOL for UNIX is distributed as two individual products. For clarity, this article will refer to them as the "development" product and the "runtime" product.The development product is officially named "Server Express". It includes the entire product offering: the compiler and development tools (including Animator), and also the runtime system and its supporting libraries and files.The runtime product is officially named “Server for COBOL" (or in older versions, "Application Server for Server Express"). This is a sub-set of the development product. It includes only the runtime system and supporting libraries and files; it does not include the COBOL compiler or Animator. The runtime product is meant to be installed on a machine on which there is no need to compile COBOL; in other words a "deployment" or "production server" machine.This Knowledgebase article addresses the following situation: a certain machine operates as a production server and normally has only the runtime product installed. But a COBOL program behaves unexpectedly and developers want to use Animator to debug the problem. The problem cannot easily be reproduced on development machines, so they would like to debug the code running on the production server.In order to use Animator, the development product a.k.a. Server Express must be installed. A system administrator installs it in a separate directory than the existing runtime product. The system administrator also installs the LMF license manager and at least one development license. To use Animator, individuals change their .profile or login script, setting the COBDIR environment variable to the location of the newly-installed development product instead of the runtime product.When the debugging is finished, the system administrator wishes to restore the machine to its original condition, completely removing the development product but leaving the runtime product intact. This Knowledgebase article describes how to restore the machine to its original condition.

Resolution:

Use root credentials for all commands shown below. The first step is to find the directory where the LMF (the development license manager) was installed, because this directory will need to be removed. When the overall product "Server Express" was installed, the user was asked where the LMF should be installed, and might have specified any arbitrary location, or might have taken the default.

To find the LMF location:

With COBDIR set to the location of the main development product "Server Express", enter the following command:



$COBDIR/lmf/lmfgetpv

If the license manager is running, this command will show output similar to this:


License Manager version 128
Loaded from /opt/microfocus/mflmf

If so, take note of the "loaded from" directory (in this example /opt/microfocus/mflmf). Write it down because it is needed later in these instructions, then skip ahead to Step 2.

If the license manager is not running, the above command will return:


License Manager is not running

In that case, enter the following command:


cat /etc/mflm*

This will cat the file /etc/mflmrcscript to the screen. It will look something like this:


echo Starting MFLM License Manager
COBDIR=/opt/microfocus/mflmf
export COBDIR
LD_LIBRARY_PATH=$COBDIR/lib:$LD_LIBRARY_PATH:/lib
export LD_LIBRARY_PATH
cd /opt/microfocus/mflmf
./mflm_manager

Notice the "cd" command in the second-to-last line. The directory shown in this "cd" command (/opt/microfocus/mflmf in this example) is the LMF directory. Whatever directory is shown, write it down because it is needed later in these instructions.

Step 2.

The second step is to remove development licenses and corresponding "developer usage" runtime licenses. First, we will look in "apptrack" to see existing "developer usage" licenses, so later we can confirm they were removed. Enter the command:


mflicense

This command should already be on your PATH and so should run straight away. If not, it exists in $COBDIR/bin, so invoke it by entering:


$COBDIR/bin/mflicense

Note: in old versions of Server Express (versions prior to v4.0), "mflicense" does not exist, so invoke apptrack using the following command:



$COBDIR/aslmf/apptrack

The "mflicense" command displays this menu:


Select the License system required
1. Development License System
2. Application Server License System
X. Exit

Press the "2" key then press Enter. Your COBDIR setting will be echoed as a confirmation. Press Enter.

Once inside Apptrack, press the "2" key for License Summary.

Note the existence of several licenses denoted "**AS Developer Usage". We will come back here later to verify that these have been removed.

Press ESC and then "9" to quit, then "X" to exit mflicense.

Change directories to the LMF location determined in the first step above; for example "cd /opt/microfocus/mflmf". Enter the following commands:


./lmfgetpv k
rm mflmfdb*
./devas

These commands will stop the license manager (if it happens to be running), remove the existing license database, then remove "developer usage" licenses from apptrack.

To verify, invoke apptrack again, as before, and press "2" for license summary. Note that "developer usage" licenses no longer appear. Exit apptrack.

Step 3.

Change directories to the location where Server Express was installed, in other words, cd $COBDIR. Change directories up one level to its parent directory, then use the command:


rm –rf

to remove it. Then change directories to the LMF location determined in the first step above. Change directories up one level to its parent directory, then use an "rm -rf" command to remove it.

Next remove the file /etc/mflmrcscript.

Next edit the file /etc/inittab and delete the line at or near the bottom that begins with "mF", for example, the line:


mF:2345:wait:sh /etc/mflmrcscript > /dev/null 2>&1

then save your changes to /etc/inittab.

The LMF creates shared memory segments for its internal use, and these will still exist. They will not interfere with operation of the runtime, but to get rid of them permanently, reboot the server at the next convenience.

At this point all traces of Server Express are gone and Server for COBOL is left as it was.






Date:

Name:

Description of change:
Date:

Name:

Description of change:

Old KB# 14398