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

You can use a generic ODBC manager library to connect to c-treeRTG, similar to how it is done in Windows.
One of the most common is the unixODBC library.
This software may not be installed on your system. Use a command like this to install it:

   sudo apt install unixodbc
Here's how to configure the c-tree ODBC driver and create and test a DSN on Linux.
  1. Define the c-tree driver: edit the file /etc/odbcinst.ini, e.g.
        [ctreeDriver]
        Driver=/path/to/libctodbc.so
        Description=ODBC for c-treeRTG
        FileUsage=1
    
    Note - The libctodbc.so library is installed along with c-tree in the "drivers/ctree.drivers/lib" subfolder.
  2. Create a DSN bound to this driver: edit the file /etc/odbc.ini, e.g.
        Driver=ctreeDriver
        Host=localhost
        Database=ctreeSQL
        Service=6597
        Description=ctreeSQL data source
    
  3. To allow the unixODBC library to 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]

  4. Set the ODBCINI environment variable, e.g.
        export ODBCINI=/etc/odbc.ini
    
  5. Check that your unixODBC is configured for c-tree by running a tool connected to a unixODBC data source.
    For example, you can execute unixODBC's Interactive SQL (isql) from /usr/bin as shown below:
        isql -v ctreeDSN admin ADMIN
    
More information is given in the FairCom documentation here.
Authored by: Veryant Support This question has been viewed 3626 times so far.
Click Here to View all the questions in c-treeRTG (SQL feature ) 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 c-treeRTG's SQL full-functioning instance of c-treeRTG that supports mainframe data? Or is this a data migration tool?
  2. How to install just c-treeRTG's ODBC client without having to use the full installation setup
Article Information Additional Information
Article Number: 305
Created: 2019-08-08 10:06 AM
Rating: 3 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.