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 > isCOBOL SQL Server (c-treeACE SQL) > How can I setup an ODBC data source for c-treeSQL on Linux?
Question Title How can I setup an ODBC data source for c-treeSQL on Linux?

The unixODBC software allows to create ODBC data sources on Linux.
This software may not be installed on your system. Use a command like this to install it:

    sudo apt install unixodbc
Below we'll explain how to configure the c-tree ODBC driver and how to create and test a DSN on Linux.

Edit the file /etc/odbcinst.ini to define the driver, e.g.
    [ctreeDriver]
    Driver=/path/to/libctodbc.so
    Description=ODBC for ctreeSQL
    FileUsage=1
Note - The libctodbc.so library is installed along with c-tree in the "driver/sql.odbc" subfolder.

Now that you have a driver, edit the file /etc/odbc.ini to create a DSN bind to this driver, e.g.
    [ctreeDSN]
    Driver=ctreeDriver
    Host=localhost
    Database=ctreeSQL
    Service=6597
    Description=ctreeSQL data source
To allow the unixODBC install the odbcinst and odcini you must execute the following commands:
    odbcinst -i -d -f /etc/odbcinst.ini
    odbcinst -i -s -l -f /etc/odbc.ini 
You can test if your DSN is installed by executing:
    odbcinst -s -q
Expected result: [ctreeDSN] Please consider to set ODBCINI on environment variables, e.g.:
    export ODBCINI=/etc/odbc.ini
Now you can check if your unixODBC is configured for c-tree by running a tool connected to a unixODBC data source.
For example, you can execute the Interactive SQL (isql) from /usr/bin as shown below:
    isql ctreeDSN ADMIN ADMIN

Authored by: Veryant Support This question has been viewed 869 times so far.
Click Here to View all the questions in isCOBOL SQL Server (c-treeACE SQL) 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. Is isCOBOL SQL Server a full-functioning instance of SQL Server that supports mainframe data? Or is this a data migration tool?
Article Information Additional Information
Article Number: 305
Created: 2019-08-08 10:06 AM
Rating: No Rating
 
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.