RELOPS/DSS Documentation

Managing MicroFocus Cobol

small-ballon_rev_hl.gif (420 bytes) vline2x22.gif (38 bytes)
 
merant.gif (4549 bytes)
vline2x250.GIF (59 bytes) small-ballon_ven.gif (407 bytes)
MF/Merant
Microfocus/Unix


To install Micro Focus Cobol, access the system using a PC terminal vt100 emulator (tnvt,crt,vt100,etc) or using an Unix desktop running an "xterm" window (ie at the unix prompt type "xterm &", this will create and xterm window which you should work from).

Note that from now on we will install cobol in the products directory in order to accomodate the new /etc/profile which has the ability to handle multiply versions of cobol. This means cobol will no longer exist in /usr/lib/cobol. If an old version exist here, it will need to be moved to the products directory. The same holds true if an older version such as 4.0 needs to be installed for the first time.

If you will be installing the HP Release of MicroFocus Cobol 4.1 for HP-UX, see that section later in this document.

If you will be installing the Micro Focus Cobol 4.1 on Siemens , Click here to go to that section.

If you will be installing Sequent's Micro Focus Cobol, click here to go to that document.

NOTE: If we do not a media for a particular platform/version you can check the Micro Focus Product Matrix to see if it is available.

If you will be installing Merant's Server Express, click here to go to that section of the  document.

 


Installing Micro Focus Cobol 4.1

  1. Login as "root" and create the following directories and symbolic links:
    mkdir -p /cobol/prod
    mkdir -p /products/mf/ocobol-4.1/usrbin
    ln -s /products/mf/ocobol-4.1 /cobol/prod/4.1

  2. Make sure that the following environment varibles are set:
    COBDIR=/products/mf/ocobol-4.1
    export COBDIR
    PATH=$COBDIR/bin:$PATH
    export PATH
    LD_LIBRARY_PATH=$COBDIR/coblib
    export LD_LIBRARY_PATH

    For HP-UX system also set the following:

    SHLIB_PATH=$COBDIR/coblib
    export SHLIB_PATH

    For IBM AIX system also set the following:

    LIBPATH=$COBDIR/coblib
    export LIBPATH

  3. If an existing version of cobol exist mv it to the products directory. To check for an existing version, look for /usr/lib/cobol. On HP and Sun systems, also check for /opt/cobol or /opt/lib/cobol. To determine the cobol version, "cd" to the cobol directory and "cat cobver". The example below assumes cobol exist in /usr/lib and is version 4.0.

    mkdir /products/mf/cobol-4.0
    cd /usr/lib/cobol
    find . -print | cpio -pvmud /products/mf/cobol-4.0
    cd /usr/lib
    rm -rf cobol
    ln -s /products/mf/cobol-4.0 /cobol/prod/4.0

    NOTE1: Cobol will install its binaries in /usr/bin or /bin. They must be removed. You can use the "rmcobolbin" script found in the disk repository, under /repos1/scripts. If there's nothing in /repos1, go to manual mounts for procedures on mounting /repos1. If the cobol binaries are elsewhere, use the directory name as an argument for the script.

    NOTE2: On most HP systems cobol will be in /opt/cobol and will contain a sub-directory named "cobdir". It is this directory that should be symbolically linked. Also, on HP, check the /etc/PATH file to make sure there is no references to any cobol paths.

  4. Perform an "ls" on the /jukebox1 directory. If the automounter is configured and running you will see a list of files. If not, manually mount the jukebox. Go to manual mounts for procedures.

  5. Change to the /products/mf/ocobol-4.1 directory and unpack the "ocobol.tar" tar file which is located in /jukebox1/mfocobol-<platform>-4.1 directory. Note that the spelling of the directory name may not be the same across all platforms.
    cd /products/mf/ocobol-4.1
    tar xvf /jukebox1/mfcob-ocobol-4.1/ocobol.tar

  6. SUN Platform Specific Note: There is a new install program supplied from Micro Focus which is in the disk repository. Replace the current install with the new one as follows:
    tar xvf /repos1/Sun/mf4.1-installscript-sun.tar

    NOTE: If the repository is not auto mounted, then go to manual mounts for procedures on how to mount the filesystem.

  7. Run the install program. sh ./install

  8. The install program will prompt for a number of questions. Answer them as follows:
    Driver Programs are to be installed in? /products/mf/ocobol-4.1/usrbin
    Will you be writing object oriented cobol? N
    Install Micro Focus LMF facility? Y
    Directory to install License Mananger? /products/mf/ocobol-4.1/mflmf
    Directory does not exist, create? Y
    License manager autostart at boot? Y

  9. In order to enter the license information it is recommended to open up an xterm session. Change to the License Manager directory and run the License Manager Adminstration Program.
    cd /products/mf/ocobol-4.1/lmf
    ./mflmadm

  10. Update the Serial No. and License Key by pressing the F2 key.

  11. Lookup the platform you are installing on the table below, type in the Serial as show on the table and press the Tab key. Then type the Key Number as show on the table and press Enter.
    Platform Serial No. Key No.
    Solaris 000611389 01010 10000 014A8 C0D1B 1DD4
    HP-UX 000611388 01010 10000 014A8 C0A1C 2ED6
    AIX 000611281 01010 10000 014A5 E731E 36B8
    NCR/MP-RAS 000644464 01010 10000 014A9 A6618 5D7E
    DEC 4.0B 000644463 01010 10000 014A9 A6211 28E2
    OTHER 000611281 01010 10000 014A5 E731E 36B8
  12. Press the F3 key and then Enter to install the license. Press the Esc key and then letter Y to exit the program.

    NOTE: If more than 1 license is requested, additional license keys for Digital, HP, Ibm, Sequent, and Sun are located in /repos1/Misc/mfc-lic-all-4.1.txt. Follow the same procedures as above (F2, enter, F3-install). Then press F6 for more, and then F3 for refresh (this will force the license manager to use the new license database). If you have problems using the function keys, try the forward slash and the number (i.e., instead of F3, use /3).

  13. Start the License Manager daemon.
    ./mflm_manager

  14. Check to make sure the license manager is running.
    ps -ef | grep mflm_manager

    You should see "mflm_manager" in the list returned from the command.

  15. Now edit the /etc/mflmrcscript file and make the following changes:

    a. Add the following as the very first line in the file:
       #!/bin/sh

    b. Change the line starting with "COBDIR=" to:
       COBDIR=/cobol/prod/4.1

    c. Change the line with the "cd" command to:
      cd $COBDIR/lmf

  16. Edit /etc/inittab and modify the line beginning with "mflmf" to the following line:

    mf:23:wait:/etc/mflmrcscript > /dev/null 2>&1

    Note for AIX: Use the rmitab command to remove the existing inittab line: Example: # rmitab mf Then, use the mkitab command to add the correct inittab entry:
    Example: # mkitab "mf:23:wait:/etc/mflmrcscript > /dev/null 2>&1"

    NOTE: Be sure to check the "initdefault" line in the file to determine the default run level. If it's not 2 or 3, include the default in the line for  the license manager (or it won't start at startup).

  17. Test the compiler version option by typing the following:
    $COBDIR/bin/cob -V

    You should see version information about the product.

  18. SUN Platform Specific Note: Update the $COBDIR/coblib/liblist file to reflect the correct version of C libraries. Any references in the liblist file to "SC3.0.1" must be changed to "SCx.x" where x.x is the correct version. To verify the installed version of the C compiler type the following command:   $pkginfo -i | grep SPROcc

    Also, remove the following two lines form the liblist file:

    i/opt/SUNWspro/SC3.0.1/lib/__fstd.o p/opt/SUNWspro/SC3.0.1/lib/__fstd.o

  19. Test the installation by compiling and running the pi.cbl demo program found in the cobol demo directory.

    NOTE: In order for cobol to work properly for the standard logins, the system's /etc/profile must be that of the DSS-AUTOMATION version (tl-sun01:/usr/local/psdist/profile.gen) or the DSS-UNIX version (tl-sun01:/usr/local/bin/profile.dss).

    cp /products/mf/ocobol-4.1/demo/pi.cbl /tmp
    chmod 777 /tmp/pi.cbl
    su - oracle (or use any other standard user account)
    [Be sure the COBDIR, PATH, and LD_LIBRARY_PATH variables are set correctly.]
    cd /tmp
    cob -Vup pi.cbl

    At this point you should see output from the compiler. To check the compile, run the program by typing the following:

    cobrun pi

    You should see the calculation of pi.

  20. NOTE: If you performed any manual mounts during this process, unmount them now.

  21. IBM AIX Platform Specific Note: If this system is running Oracle you will need to install MicroFocus's patch #25554 to fix a linking problem. The patch is also referred to as AIX_COB_FIX. If your system is running AIX 4.2.1/4.3.x and Oracle 7.x/Oracle 8.x and PeopleTools 7.5 edit $COBDIR/coblib/liblist.

  22. DEC UNIX Platform Specific Note: You must check to make sure the liblist is for the procedural cobol and not the object oriented. This can be done by changing to $COBDIR/coblib and comparing the "liblist" file size to "liblist_proc" file size. These should be the same. If not, copy "liblist_proc" to "liblist".




Installing the HP Release of MicroFocus Cobol 4.1 for HP-UX

  1. Get the correct HP APPLICATIONS cdrom to install the cobol filesets.

    NOTE: HP's Release of MicroFocus Cobol 4.1 is also called Object Cobol.

    For HPUX 10.20:
    bulletUse APPLICATIONS cdrom dated October 1997 (CD Part Number B3920-13869).
    bulletProduct to be installed: Object Cobol/UX Developer (B.12.25)... includes both Developer and Run-Time filesets.

    For HPUX 11.0:
    bulletUse APPLICATIONS cdrom dated November 1997 (CD Part Number 24998-12489).
    bulletProduct to be installed: Object Cobol/UX Developer (B.12.50)... includes both Developer and Run-Time filesets.

  2. If there is an older version of HP Cobol on the system that you wish to keep, copy it to another directory using copy_release:
    bulletmkdir /opt/cobol_prev
    bullet/opt/cobol/bin/copy_release /opt/cobol_prev

    Then use swremove to remove all mention of any COBOL product from the system by issuing the following commands:
    bulletswremove -v COBOLDIAG
    bulletswremove -v COBOLTBOX
    bulletswremove -v COBOLCRT
    bulletswremove -v COBOLRT
    bulletswremove -v COBOLDEV

  3. Login as root and install the cobol filesets from HP's APPLICATIONS cdrom.

    NOTE: Normally a codeword is needed to get the Cobol filesets off the cdrom. For HPUX 10.20, get the codeword from our "HPUX Keycodes" manual. For HPUX 11.0, our current cdrom is unsecured so no codeword is needed.
    bulletMount the cdrom.
    bulletRun swinstall as root.
    bulletSelect Local CDROM for "Source Depot Type".
    bulletEnter your cdrom mount point for "Source Depot Path".
    bulletSelect OK.
    bulletFrom "Actions" select Add New Codeword and enter your codeword for this cdrom (codeword currently not needed for the HPUX 11.0 cdrom).
    bulletYou should now get a full listing of what's on the cdrom. Highlight the Object Cobol Developer product.
    bulletFrom "Actions", mark the product for installation.
    bulletFrom "Actions" select Install (analysis).
    bulletOnce the Analysis Phase finishes successfully, follow the prompts to install the product.
    bulletOnce Installation is done, Exit out of swinstall and unmount the cdrom.

  4. Edit the /etc/PATH file and remove references to any cobol paths, such as /opt/cobol/bin.

  5. HP's cobol gets installed under /opt/cobol. Create the following directory and symbolic link:
    mkdir -p /cobol/prod
    ln -s /opt/cobol/cobdir /cobol/prod/hp-4.1

  6. Make sure that the following environment varibles are set:
    COBDIR=/cobol/prod/hp-4.1
    export COBDIR
    PATH=$COBDIR/bin:$PATH
    export PATH
    LD_LIBRARY_PATH=$COBDIR/coblib
    export LD_LIBRARY_PATH
    SHLIB_PATH=$COBDIR/coblib
    export SHLIB_PATH


  7. Execute a script to install and configure the FLEXlm license manager.

    NOTE: For more detailed installation procedures and troubleshooting tips, see the file: /opt/cobol/cobdir/docs/hp-relnotes_cbl.txt
    bulletcd /opt/cobol/cobdir
    bullet./hpmfocdsini
    bulletThe script will display the hostid and hostname. Write this information down as it will be needed to obtain a license key.
    bulletUse the defaults. The product will be installed under /usr/local/flexlm.

    Output from the hpmfocdsini script is in /var/tmp/hpmfocdsini.log.

  8. Obtain a license key from HP's License Center.

    NOTE1: License keys may be obtained via fax or email (through the HP Support Center web site: http://us-support.external.hp.com). The steps below assume you'll be faxing the information to HP.

    NOTE2: You'll need a system handle to request a license key. Most of our handles only have 1 license available to them. Check the sheet in the HPUX Keycodes manual for a handle that hasn't been used. Hopefully this is just a temporary solution.
    bulletFill out a license request form for HP Object Cobol. A blank form should be in the HPUX Keycodes manual. You'll need the hostid, hostname, and system handle. Request only 1 user license.
    bulletFax form to the HP License Center: 800-541-2633
    bulletThe License Center should fax back to you a license key within 8 business hours. To check on the status, call: 650-960-5111.

  9. Update the license.dat file with the license key information.
    bulletcd /usr/local/flexlm/licenses
    bulletvi license.dat (this file may need to be created)
    bulletUpdate license.dat with all 3 lines, related to SERVER, DAEMON, and INCREMENT.
    bulletchmod 644 license.dat

  10. Update our HPUX Keycodes manual.
    bulletCheck off the system handle used for obtaining the license key.
    bulletAlso file the sheet having the license key information in the manual.

  11. Update a cobol file. HP says this must be done if PeopleSoft products are being installed. Otherwise, we get "unresolved symbol" error messages during the compile:
    bulletcd /opt/cobol/cobdir/coblib
    bulletcp liblist liblist.org
    bulletvi liblist and remove the following line:

    c-loops

  12. Put a flexlm startup script, located in the disk repository, in /sbin/init.d.
    bulletcd /repos1/HP
    (If /repos1 has no data, go to manual mounts for procedures on how to mount /repos1.)
    bulletcp flexlm_startup.cob4.1 /sbin/init.d/flexlm_startup

    Now create a symbolic link, and change permissions/ownership:

    bulletcd /sbin/init.d
    bulletchmod 555 flexlm_startup
    bulletchown bin:bin flexlm_startup
    bulletln -s /sbin/init.d/flexlm_startup /sbin/rc2.d/S950flexlm_startup

  13. Start up the license manager and check the status of Flexlm:
    bulletcd /sbin/init.d
    bullet./flexlm_startup
    bulletps -ef | grep lmgrd (lmgrd should be running)
    bulletcd /usr/local/flexlm/bin
    bullet./lmstat -a You should see the following:

    license server UP HPCUPLANGES: UP Users of hpmfcobol: (Total of 2 licenses available)

    NOTE: Even though you request only 1 license, the HP Object Cobol provides you with an overdraft license allotment of ten percent of the number of licenses you purchased, rounded up to the next integer. When all purchased licenses are in use, licenses are granted from this overdraft allotment until it is exhausted. A warning message is displayed on stderr each time a license is requested from the overdraft allotment.

  14. Test the compiler version option by typing the following. cob -V

    You should see version information about the product.

  15. Test the installation by compiling and running the pi.cbl demo program found in the cobol demo directory.

    NOTE: In order for cobol to work properly for the standard logins, the system's /etc/profile must be that of the DSS-AUTOMATION version (tl-sun01:/usr/local/psdist/profile.gen) or the DSS-UNIX version (tl-sun01:/usr/local/bin/profile.dss).

    cp /opt/cobol/cobdir/demo/pi.cbl /tmp
    chmod 777 /tmp/pi.cbl
    su - oracle (or use any other standard user account)
    cd /tmp
    cob -Vup pi.cbl

    At this point you should see output from the compiler. To check the compile, run the program by typing the following:
    cobrun pi
    You should see the calculation of pi.

    Now exit from su - <userid> back to root.

  16. Check the status of the license manager and bounce lmgrd to make all licenses available to the user.
    bulletcd /usr/local/flexlm/bin
    bullet./lmstat -a

    NOTE:You'll see the login you used to test the cobol associated with one of the licenses. With HP Cobol 4.1, the license stays with the user for one hour after the completion of the compile. The license is tied to the specific host machine, user, and ttyname for one hour after the last use of a licensed COBOL component, and is NOT released if the user logs off. There is no way currently to change this time limit.

    In order to free up the license you used for testing, lmgrd must be bounced:
    bulletps -ef | grep flexlm (determine pids of flexlm processes - one for lmgrd and one for HPCUPLANGS)
    bulletkill [flexlm pid numbers]
    bulletcd /sbin/init.d
    bullet./flexlm_startup

    Now check the status to make sure all licenses are available:
    bulletcd /usr/local/flexlm/bin
    bullet./lmstat -a

  17. NOTE: If any manual mounts were performed, please unmount those file systems now.

You are now done with the installation of HP Cobol 4.1.


Installing Micro Focus Cobol 4.1 on Siemens

  1. Login as "root" and create the following directories and symbolic links:

    NOTE: If MF Cobol 4.0 is installed in /opt/lib/cobol you will need to move it to the products directory and do a pkgrm of cobol 4.0:
    bulletmkdir -p /products/mf/ocobol-4.0
    bulletcd /opt/lib/cobol; find . -print | cpio -pd /products/mf/ocobol-4.0
    bulletpkginfo -x | grep cobol (You should see cobol40 Micro Focus COBOL V4.0 for UNIX)
    bulletpkgrm cobol40

    Continue on with the install of MFCobol 4.1.

    mkdir -p /cobol/prod
    mkdir -p /opt/lib/cobol
    ln -s /opt/lib/cobol /cobol/prod/4.1

  2. Make sure that the following environment variables are set:
    COBDIR=/opt/lib/cobol
    export COBDIR
    LD_LIBRARY_PATH=$COBDIR/coblib
    export LD_LIBRARY_PATH


  3. Perform an "ls" on the /jukebox1 directory, if you do not see a list of files then manually mount the jukebox. Go to manual mounts for procedures on how to do this.

  4. Run the pkgadd command:
    bulletpkgadd -d /jukebox1/Sni-MFcobol-4.1/cobol_nyms/4_1a00/ds02*
    bulletPress enter for All
    bulletEnter the path for the Cobol System files: /opt/lib/cobol
    bulletEnter the path for the Cobol Driver programs: /opt/bin
    bulletWill you be writing Object oriented Cobol programs with this release y/n? N

    The product will now install.

    Install the Cobol 4.1 licenses.
    bulletcd /etc/.products/.legit
    bulletftp tl-sun04 (as user root)
    bulletcd /repos1/SNI
    bulletprompt
    bulletmget mfc-lic-sni-4.1.tar
    bulletftp> quit
    bullettar xvf mfc-lic-sni-4.1.tar

  5. Test the compiler version option by typing the following.
    bulletcob -V

    You should see version information about the product.

  6. Test the installation by compiling and running the pi.cbl demo program found in the cobol demo directory.

    NOTE: In order for cobol to work properly for the standard logins, the system's /etc/profile must be that of the DSS-AUTOMATION version (tl-sun01:/usr/local/psdist/profile.gen) or the DSS-UNIX version (tl-sun01:/usr/local/bin/profile.dss).

    cp /opt/lib/cobol/demo/pi.cbl /tmp
    chmod 777 /tmp/pi.cbl
    su - oracle (or use any other standard user account)
    cd /tmp
    cob -Vup pi.cbl

    At this point you should see output from the compiler. To check the compile, run the program by typing the following:

    cobrun pi

    NOTE: If you receive a ld: error when running cobrun then you will need to install the C++RTS and bug fix SIN3B089 patch from the Siemens CD-DEV-MI (Development Tools and Compiler) CD. Mount the CD on tl-sun01 share the CD and install C++RTS:
    bullettl-sun01#share -F nfs -o ro /cdrom/cdrom0
    bulletsp-sni01#mount -F nfs -r tl-sun01:/cdrom/cdrom0 /mnt
    bulletsp-sni01#cd /mnt/cds_nyms/l*/
    bulletsp-sni01#pkgadd -d /mnt/cds_nyms/l_0c00/ds02*
    bulletsp-sni01Select the C++RTS package.
    bulletsp-sni01Install Bug Fix SIN3B089.
    bulletsp-sni01#cd /mnt/cds_pl_pleks_nyms/l_0e00/ds04*
    bulletsp-sni01Select SIN3B089

    Test the cobrun again.

  7. NOTE: If any manual mounts were performed, please unmount those file systems now.

    The end of the Siemens Cobol Installation

Installing Micro Focus Cobol 4.0

Micro Focus Cobol 4.0 must be installed in the products directory in order to accomodate the new /etc/profile which has the ability to handle multiply versions of cobol. This means cobol will no longer exist in /usr/lib/cobol. If an old version exist here, it will need to be moved to the products directory.

Note, on HP systems, Micro Focus Cobol is part of the HP application product line which is installed using "swinstall". This process will install cobol in the /opt/cobol/cobdir directory which should be symbolically linked to /cobol/prod/<ver>.

  1. Login as "root" and create the following directories and symbolic links:
    mkdir -p /cobol/prod
    mkdir -p /products/mf/cobol-4.0/usrbin
    ln -s /products/mf/cobol-4.0 /cobol/prod/4.0

  2. Make sure that the following environment varibles are set:
    COBDIR=/products/mf/cobol-4.0
    export COBDIR
    LD_LIBRARY_PATH=$COBDIR/coblib
    export LD_LIBRARY_PATH

    For HP-UX system also set the following:

    SHLIB_PATH=$COBDIR/coblib
    export SHLIB_PATH

    For IBM AIX system also set the following:

    LIBPATH=$COBDIR/coblib
    export LIBPATH

  3. If an existing version of cobol exist mv it to the products directory. To check for an existing version, look for /usr/lib/cobol. On HP and Sun systems, also check for /opt/cobol or /opt/lib/cobol. To determine the cobol version, "cd" to the cobol directory and "cat cobver". The example below assumes cobol exist in /usr/lib and is version 3.2.
    mkdir /products/mf/cobol-3.2
    cd /usr/lib/cobol
    find . -print | cpio -pvmud /products/mf/cobol-3.2
    cd /usr/lib
    rm -rf cobol
    ln -s /products/mf/cobol-3.2 /cobol/prod/3.2

    NOTE1: Cobol will install its binaries in /usr/bin or /bin. They must be removed. You can use the "rmcobolbin" script found in the disk repository, under /repos1/scripts. If there's nothing in /repos1, go to manual mounts for procedures on mounting /repos1. If the cobol binaries are elsewhere, use the directory name as an argument for the script.

    NOTE2: On most HP systems cobol will be in /opt/cobol and will contain a sub-directory named "cobdir". It is this directory that should be symbolically linked. Also, on HP, check the /etc/PATH file to make sure there is no references to any cobol paths.

  4. Perform an "ls" on the /jukebox1 directory. If the automounter is configured and running you will see a list of files. If not, manually mount the jukebox. Go to manual mounts for procedures.

  5. Change to the /products/mf/cobol-4.0 directory and unpack the "cobol.tar" tar file which is located in /jukebox1/MFcobol-4.0 directory. Note that the spelling of the directory name may not be the same across all platforms.
    cd /products/mf/cobol-4.0
    tar xvf /jukebox1/MFcobol-4.0/cobol.tar

  6. Run the install program. sh ./install

  7. The install program will prompt for the location of the Driver Programs.
    The Driver Programs must be installed in /products/mf/cobol-4.0/usrbin

  8. Test the compiler version option by typing the following. cob -V

    You should see version information about the product.

  9. Test the installation by compiling and running the pi.cbl demo program found in the cobol demo directory.

    NOTE: In order for cobol to work properly for the standard logins, the system's /etc/profile must be that of the DSS-AUTOMATION version (tl-sun01:/usr/local/psdist/profile.gen) or the DSS-UNIX version (tl-sun01:/usr/local/bin/profile.dss).

    cp /products/mf/cobol-4.0/demo/pi.cbl /tmp
    chmod 777 /tmp/pi.cbl
    su - oracle (or use any other standard user account)
    cd /tmp
    cob -Vup pi.cbl

    At this point you should see output from the compiler. To check the compile, run the program by typing the following:

    cobrun pi

    You should see the calculation of pi.

  10. NOTE: If any manual mounts were performed, please unmount those file systems now