Skip to content

Installing the COBOL-IT Compiler Suite

This document describes how to install and how to use the COBOL-IT Compiler Suite.

Installing COBOL-IT

The COBOL-IT compiler cobc requires that a C Compiler be installed on the host platform.

For a complete port list, including C Compilers that have been tested and are supported, see Port List with Supported C Compilers.

The COBOL-IT Compiler Suite Distribution

COBOL-IT Compiler Suite Unix/Linux distributions are provided in a "makeself" self-extracting archive file. A file-naming convention is observed when naming the distribution files. For example, the downloadable distribution for the Compiler Suite version 4.10.0 for the 64-bit Enterprise Linux x86 operating environments is named:

cobol-it-4.10.0-enterprise-64-x86_64-pc-linux-gnu_installer.sh

COBOL-IT Compiler Suite Windows distributions are provided in a Windows Setup executable. The downloadable distribution for the Enterprise Edition of the Compiler Suite version 4.10 for Windows 64-bit operating environments is named:

cobol-it-4.10-64-x64-vc2015-windows-enterprise-311224-setup.msi

Enterprise Editions of the COBOL-IT Compiler Suite are downloadable from Micro Focus, with access provided by your Sales Representative.

Installing the binary distributions (Linux/Unix)

The COBOL-IT Linux/Unix 32-bit binary distributions are intended to be installed in /opt/cobol-it4. The COBOL-IT Linux/Unix 64-bit binary distributions are intended to be installed in /opt/cobol-it4-64.

An example with a 64-bit Linux binary distribution:
As a root user, download the installer.sh that is compatible with your platform.
cobol-it-4.10.0-enterprise-64-x86_64-pc-linux-gnu_installer.sh

From the folder in which the COBOL-IT install is located:

As superuser, run the installer.
% sudo sh cobol-it-4.10.0-enterprise-64-x86_64-pc-linux-gnu_installer.sh

The script will be promted to accept the license agreement, and upon acceptance install the distribution in /opt/cobol-it4-64 by default.

There are a number of options that can be used with the install. Run it with the --help option to discover what they are. A couple of the more useful ones are: - --target

: Extract directly to a target directory (absolute or relative). This will require the user change to the cobol-it-setup.sh file located in the bin directory to specify this alternate location. - --accept : Accept the license - --list : list the files of the archive - --check : check integrity of archive

Run the cobol-it-setup.sh script to set all needed environment variables:
% source /opt/cobol-it4-64/bin/cobol-it-setup.sh (64-bit Linux/UNIX)
% source /opt/cobol-it4/bin/cobol-it-setup.sh (32-bit Linux/UNIX)

The license can be made available through a couple mechanisms. Perhaps the easiest is to copy the license file (provided it confroms to the standard naming convention, citlicense*.xml) to the installation directory (/opt/cobol-it4-64 in this example).
Another mechanism is to set the COBOLIT_LICENSE environment variable to the fully qualified name of the file.

You are now ready to use the compiler.

Installing the binary distributions for the RuntimeOnly (Linux/Unix)

Itentical to the process above, but the installer will be the runtime
'cobol-it-4.1:qualified0.0-enterprise-64-x86_64-pc-linux-gnu-runtimeonly_installer.sh'

cobol-it-setup.sh

       #setup the needed environement variables 
       DEFAULT_CITDIR=/opt/cobol-it4-64; export DEFAULT_CITDIR 
       # 
       # Copyright (C) 2008-2009 Cobol-IT 
       # 
       if [ "x${COBOLITDIR:=}" = "x" ] 
       then 
           if [ -f $DEFAULT_CITDIR/bin/cobol-it-setup.sh ] 
           then 
               COBOLITDIR=$DEFAULT_CITDIR 
           else 
               echo You must define COBOLITDIR to the root instalation dir of COBOL-IT 
           fi 
       fi 
       if [ "x${COBOLITDIR:=}" != "x" ] 
       then 
           PATH=$COBOLITDIR/bin:${PATH} 
           LD_LIBRARY_PATH="$COBOLITDIR/lib:${LD_LIBRARY_PATH:=}" 
           DYLD_LIBRARY_PATH="$COBOLITDIR/lib:${DYLD_LIBRARY_PATH:=}" 
           SHLIB_PATH="$COBOLITDIR/lib:${SHLIB_PATH:=}" 
           LIBPATH="$COBOLITDIR/lib:${LIBPATH:=}" 
           COB="COBOL-IT" 
           export COB COBOLITDIR LD_LIBRARY_PATH PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH 
           echo COBOL-IT Environment set to $COBOLITDIR 
           fi 
If installation is not in the default directory, the DEFAULT_CITDIR value should be edited.

Installing the binary distributions (Windows)

The COBOL-IT Windows 32-bit binary distributions are intended to be installed in C:\COBOL\COBOL-IT.
The COBOL-IT Windows 64-bit binary distributions are intended to be installed in C:\COBOL\COBOLIT64.

These are provided as Windows Setup executable files.

Click on the Windows-Setup executable to launch the setup.
Select the installation language, and click OK. To verify that you want to install the COBOL-IT COBOL Compiler Suite, click Yes.

Proceed through the initial install screen by clicking Next.
Select the C Compiler you have installed on your system.
Then, accept the default Destination Location by clicking Next.

Windows Setup Executable

Select the Component that you would like to install on your system, and click Next.

COBOL-IT Supports the 32-bit and 64-bit Visual C 2010, Visual C 2012, Visual C 2013 and Visual C 2015/17/19 Compilers.

Select Components

After files are copied, click Finish.

The installation is now complete. This will create a Quick Launch Shortcut, which will cause the setenv_cobolit.bat file to be executed when you open your command shell. Setenv_cobolit.bat sets all the environment variables needed to begin using the COBOL-IT Compiler Suite.

You are now ready to use the compiler.

setenv_cobolit.bat (Windows 32)

COBOL-IT Supports the 32-bit Visual C 2010, Visual C 2012, Visual C 2013 and Visual C 2015/17/19 Compilers.

For the case described in the Installation above, where the user selected MS Visual C++ 2015/17/19, setenv_cobolit.bat checks for the installation of Visual C++ 2019, 2017 and 2015, and exits if it does not find any of them.

       @echo off
       if "%VSINSTALLDIR%_Z" NEQ "_Z" goto callVS
       if "%VS160COMNTOOLS%_Z" NEQ "_Z" goto callVS16
       if "%VS150COMNTOOLS%_Z" NEQ "_Z" goto callVS15
       if "%VS140COMNTOOLS%_Z" NEQ "_Z" goto callVS14

       echo COBOL-IT Compiler need MS Visual C++ 2015/17/19 to be installed.
       pause
       exit

       :callvs
       call "%VSINSTALLDIR%VC\Auxiliary\Build\vcvars32.bat"
       goto callcobit

       :callvs16
       call "%VS160COMNTOOLS%..\..\VC\Auxiliary\Build\vcvars32.bat"
       goto callcobit

       :callvs15
       call "%VS150COMNTOOLS%..\..\VC\Auxiliary\Build\vcvars32.bat"
       goto callcobit

       :callvs14
       call "%VS140COMNTOOLS%vsvars32.bat"
       goto callcobit

       :callcobit
       if "%COBOLITDIR%_Z" NEQ "_Z" goto suite
       set COBOLITDIR=%~dp0
       echo SETTING COBOLITDIR=%~dp0

       :suite
       echo Setting Cobol-IT to %COBOLITDIR%
       SET PATH=%COBOLITDIR%\BIN;%PATH%

setenv_cobolit.bat ( Windows x64 )

COBOL-IT Supports the 64-bit Visual C 2010, Visual C 2012, Visual C 2013 and Visual C 2015/17/19 Compilers.

Installing a C compiler

If COBOL-IT does not detect the C compiler selected during installation on your Windows machine, it will return an error message. For the case where Visual C++ 2013 was selected during the installation process, the error message is constructed as follows:

echo COBOL-IT Compiler need MS Visual C++ 2013 to be installed.

For 32-bit Windows, the easiest way to get started is with a Microsoft® Visual Studio Community C compiler, which is a free download from the Microsoft website.

Supported versions are Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio 2015/17/19.

UPDATES TO SUPPORTED VERSIONS THROUGHOUT?

Installing a C runtime

The Microsoft Visual C++ Redistributable Package installs the runtime components of Visual C++ libraries required to run applications developed with Visual C++ on a computer that does not have the same version of Visual C++ installed. As an example, COBOL-IT applications that are developed using Microsoft Visual C++ 2010 require that the Microsoft Visual C++ 2010 Redistributable package be installed in order to run.

This package is available to the user if they have Microsoft Visual C++ installed on their computer.

If they do not, they must download the appropriate Microsoft Visual C++ Redistributable Package from the Microsoft website.

Citlicense.xml

COBOL-IT has made changes to licensing to all products, effective with the the release of COBOL-IT Compiler Suite version 4.0 (and later). With the release of COBOL-IT Compiler Suite version 4.0, separate license files are supported for each product/platform pairing. As a consequence, users are no longer required to use the same license for multiple products, on multiple platforms; users deploying multiple products may use multiple license files.

Default location

The default location for COBOL-IT product license files in %COBOLITDIR% (Windows) and $DEFAULT_CITDIR (Linux). For COBOLIT Compiler Suite version 4, the default installation directory is /opt/cobol-it4-64 (Linux).

Default naming convention

License files located in the default location named citlicense.xml, or with names prefixed by citlicense and with the .xml extension will be tested for validation by COBOL-IT products. As examples, COBOL-IT products would automatically test licenses named citlicense.xml, citlicense-001.xml, citlicense-myproduct.xml.

Using COBOLIT_LICENSE to reference single or multiple license files

For cases where different naming conventions are used, or where license files are not stored in the default installation directory, the user should use the COBOLIT_LICENSE environment variable to indicate the full path(es) and name(s) of their license file(s).

When a Subscription to the COBOL-IT Compiler Suite is registered, the registered user receives download authorization to the COBOL-IT Compiler Suite Enterprise Edition, and a license file which is generated to match the duration of the registered subscription.

Note

COBOL-IT Compiler Suite Enterprise Edition Subscriptions and licenses are defined as lasting for a prescribed period of time, from the date of the generation of the Subscription and corresponding license. That is, a one-year Subscription is accompanied by a one-year license, and the expiration date is set at one-year after the generation of the license, -not- one year after the installation of the software.

The COBOL-IT Compiler Suite Enterprise Edition (cobc), native executables created by the COBOL-IT Compiler Suite Enterprise Edition, COBOL-IT Runtime Enterprise Edition (libcobit.so, libcobit_dll.dll), and CitSORT search for a license file in the following manner:

Check to see if the COBOLIT_LICENSE environment variable is set. COBOLIT_LICENSE, if set, describes the full path, and license name to be used by the COBOL-IT Compiler, Compiler-generated executables, and Runtime.

Example:
For Linux/Unix-based platforms:

>export COBOLIT_LICENSE=/opt/cobol-it/license/mycitlicense.xml

Note that when indicating multiple license files, the semicolon “ ; ” separator is used. In Linux, the list of license files is started and finished with single-quote marks “ “. The single-quote is located on the same key as the double-quote on most keyboards.

Example:

>export COBOLIT_LICENSE=’/opt/cobol-it4-64/compilerlic.xml;/opt/cobol-it4-64/citsqllic.xml’

For Windows-based platforms:

       >set COBOLIT_LICENSE=C:\COBOL\COBOLIT\license\mycitlicense.xml
       >set COBOLIT_LICENSE=C:\COBOL\COBOLIT\mylic.xml;C:\COBOL\COBOLIT\mysqllic.xml

If neither the COBOLIT_LICENSE or COBOLITDIR environment variables are set, check for a file called citlicense.xml or citlicense-xxx.xml (where xxx is any string of characters) located in the default installation directory.

On Linux/Unix platforms, the default installation directory is /opt/cobol-it4 for 32-bit product, and /opt/cobol-it4-64 for 64-bit product.

On Windows platforms, the default installation directory is C:\COBOL\COBOLIT for 32-bit product, and C:\COBOL\COBOLIT64 for 64-bit product.

For information about your Enterprise Edition license, type cobc –V

Information about the Location, Name, Owner, and Expiration Date of the license are shown below:

       # cobc -V

       cobc (COBOL-IT) Enterprise
       Version 4.1.0-20181123-14 (64 bits)
       Build date Nov 23 2018 12:44:17

       COBOL-IT License (v2): /opt/cobol-it4-64/citlicense.xml
       ----------------------
       Owner : COBOL-IT Demo
           Rue de la Caserne, 45
           B-1000 Bruxelles
           Belgique

       Type : Demo
       Systems : LINUX
       Products : COMPILER RUNTIME
       Generator: COBOL-IT France
       Expire : 2018-12-31

       Thread safe programs and runtime
       Copyright (C) 2001-2008 Keisuke Nishida / Roger While for OPEN-COBOL parts
       Copyright (C) 2008-2019 COBOL-IT

       COBOLITDIR=/opt/cobol-it4-64
       COB_CC=gcc -pipe
       Temporay dir=/tmp

When a license expires, or is not found

If the COBOL-IT Compiler Suite Enterprise Edition (cobc), native executable created by the COBOL-IT Compiler Suite Enterprise Edition, COBOL-IT Runtime Enterprise Edition (cobcrun), or CitSORT fails to locate a valid license, they will exit, returning a message to the user as follows:

```txt # cobc -V Invalid enterprise license file format:

   Enterprise license is not validated.
   Please verify the environment variable COBOLIT_LICENSE value, contact your local dealer or sales@cobol-it.com
Back to top