Installing Acu4GL for Oracle Instant Client

0 Likes

Problem:

Trying to relink Oracle's Instant Client into ACUCOBOL-GT 9.x.x gives the following error:

make: *** No rule to make target "oraoci.o", needed by "libruncbl64.so". Stop.

What is the cause of it?
Is Instant Client supported in release 9.x.x of extend suite?

Resolution:

This item happens to be a configuration issue.
To resolve, please follow the following steps.

Configuring Instant Client.
------------------------------------- 
Download the basic versions from the Oracle web site.
i.e.: basic-10.2.0.5.0-linux-ppc64.zip for Instant Client
sqlplus-10.2.0.5.0-linux-ppc64.zip for the sqlplus tool

Create a directory to contain these files and unzip them.

Set an environment variable $ORACLE_HOME to point to this directory.
i.e.: export ORACLE_HOME=/home/usr/oracle

In that directory create a "bin" subdirectory and move all the files into it.

To simplify making connections with ACUCOBOL runtime, use TNS_ADMIN.

Create a directory $ORACLE_HOME/network/admin.
In that directory create a file called tnsnames.ora.
A possible entry in this file could be:

addressname =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = servername)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl11g)
    )
  )

Add the oracle directory to the paths of the server:
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:$LD_LIBRARY_PATH

Test SQL*PLUS
sqlplus scott@addressname/tiger
select user from dual;
exit

Setting up Acu4GL for Oracle.
-------------------------------------

Download the setup for extend software, choosing the SHARED Library item.
i.e.: acucob922pmk60sh.gz

Set an environment variable ACUCOBOL to point to the installation directory.
i.e.: export ACUCOBOL=/home/usr/acucbl922sh

Beginning with release 9.0, Acucorp runtime no longer needs to be relinked with Oracle's libraries.
They will be loaded dynamically at run time.

First, make sure to have a runcbl.olc license file in the $ACUCOBOL/bin directory.

Then add the Acucobol information to the system paths:
export PATH=$ACUCOBOL/bin:$PATH
export LD_LIBRARY_PATH=$ACUCOBOL/lib:$LD_LIBRARY_PATH

There is a final step in order to get the runtime functional with Oracle in this configuration.
Issue the following command: ldd $ACUCOBOL/lib/coba4ora64.so

You will notice that the file libclntsh.so is not found.
This is due to the fact that the file has been versioned in this distribution of the Instant Client.

Go to the $ORACLE_HOME/bin directory and issue the following command:
ln -s libclntsh.so.10.1 libclntsh.so

This will allow the runtime to find the correct file.
The above ldd command may be executed again to verify that everything is ok.

Now make sure the runtime is ready and that Acu4GL is reported in an output like this:
[server]runcbl -v
Micro Focus extend runtime version 9.2.2 
Serial number 123456
AcuServer client
Vision version 5 file system
Acu4GL ORACLE/OCI file system
XML version expat_2.0.0 file system
RMFM version 12 file system
Copyright (C) 1984-2012 Micro Focus. All rights reserved.

To run an actual test, use the ftestcnd.cbl program sample available in the $ACUCOBOL/sample/acu4gl directory:
ccbl -Ga -Fx ftestcnd.cbl

Create a configuration file config.ora with the following content:
DEFAULT_HOST oracle
ora_login scott
ora_passwd tiger
a_ora_database addressname

Now run the program: runcbl -le err -d -x -c config.ora ftestcnd

Follow the options shown in the interface to create a new table, write some records and read them back.

---------------------------------------------------
Reference incident number: 2661837

Claudio Contardi
Product Support Engineer, Senior
Micro Focus

Comment List
Anonymous
Related Discussions
Recommended