support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets

Veryant Knowledge Base
Home > All Categories > Data Access > RDBMS > How do I set up JDBC to communicate with Oracle database?
Question Title How do I set up JDBC to communicate with Oracle database?

isCOBOL needs the proper JDBC driver to interact with any RDBMS, including Oracle. JDBC drivers are Java libraries (jar) that are usually supplied by the RDBMS vendor. Each RDMBS has its own drivers.

Oracle has several different types of drivers, and we recommend starting with the JDBC Thin driver. You can get Oracle's JDBC drivers here: Be sure to choose the one supported by your Java version.

The JDBC jar file needs to be accessible through the CLASSPATH variable. The easiest way to do this is to put it into the %ISCOBOL%jars folder that the runtime checks automatically.

The next requirement is to put the URL and driver name in your configuration file. Example values would be:

Check the documentation for more information about these two variables. You can also access samples in isCOBOL's sample directory, in the %ISCOBOL%samplesdata-accessesql directory and the %ISCOBOL%sampleeasydboracle directory.

Other helpful links are:

Here is a real example from one of our Linux boxes:

   export ISCOBOL_JDK_ROOT=/usr/jdk1.8.0_331
   export ISCOBOL=/home/dl136134/porting/Linux32/isCOBOL2012R1
   export PATH=$ISCOBOL/bin:$PATH
   export CLASSPATH=.:$ISCOBOL/lib/iscobol.jar:$ISCOBOL/lib/isxms.jar:$ISCOBOL/lib/utility.jar
   export ORACLE_HOME=/database/oracle/app/oracle/product/11.1.0/client_1
   export CLASSPATH=$ORACLE_HOME/jdbc/lib/ojdbc6.jar:$CLASSPATH
   export PATH=$ORACLE_HOME/bin:$PATH
   export TWO_TASK=mach1
Note that we are using TWO_TASK as documented at
and A tnsnames.ora entry and the following:
  • tnsnames.ora file located in $ORACLE_HOME/network/admin
  • The ORACLE_HOME environment variable set to this Oracle home
Our tnsnames.ora file contains the following:
      (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))
      (SERVICE_NAME = mach1)
which defines the mach1 service name.

To set up the environment run the following command:

To run a program named PROGRAM run the following command:
   iscrun -c PROGRAM
where contains the following:
replacing username/password with your actual username and password
In this example, mach-1 is the hostname and mach1 is the service name.
The syntax is:
Thin-style Service Name Syntax
Thin-style service names are supported only by the JDBC Thin driver. The syntax is:
For example:
For more information about the syntax of the connection URL see "Data Sources and URLs" at
Authored by: Veryant Support This question has been viewed 107577 times so far.
Click Here to View all the questions in RDBMS category.
File Attachments File Attachments
There are no attachment file(s) related to this question.
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. Where is the Microsoft SQL Server 2005 JDBC Driver?
  2. Trying to work with MS SQL I get the error "JRE (Java Runtime Environment) version 1.7 is not supported by this driver. use classlibrary sqljdbc4.jar witch supports JDBC 4.0".
  3. Does Oracle Pro*COBOL work with isCOBOL?
  4. Where can I get products and services for Postgres (PostgreSQL)?
  5. Can isCOBOL access Oracle, MS SQL and other RDBMS?
  6. How to manage a large COBOL OCCURS on a Database with Database Bridge
Article Information Additional Information
Article Number: 191
Created: 2012-02-27 10:57 AM
Rating: 2 Stars
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
Search Knowledge Base Search Knowledge Base


© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.