Completing CONNX Installation for UNIX ODBC Drivers

 This continues the UNIX installation for systems with ODBC drivers. The installation started in CONNX Installation Procedure - UNIX.

 

Note: When using the ODBC interface, you must install an ODBC driver manager.  There are several driver managers available and CONNX Solutions, Inc. does not endorse one over the other.  The examples below are based on the Open Source ODBC Driver Manager unixODBC.  When installing this or any other driver manager, please refer to the installation instructions for the specific product.

 

Note: All UNIX instructions must be entered as lowercase characters.

  1. Create the connxdriver.template file.  

Once CONNX has been installed 
 on the UNIX system, it can be accessed through an ODBC driver manager. 
 The ODBC driver manager defines how to register the CONNX driver and/or 
 the name of your data source (DSN).
 
The following example gives 
 the information (with suggested values) needed to register CONNX to the 
 unixODBC driver manager. (Visit http://www.unixODBC.org/ for download 
 information.)  Enter this information into a text file using your 
 favorite text editor:
 
[CNXODBC] 
  The CONNX driver name, including 
 the brackets. We recommend you use CNXODBC as the driver name.
Description 
 = CONNX ODBC Driver The description 
 is treated as a comment; it is not mandatory.
Driver 
 = /installdirectory/connx/libxx/libconnx32.so
Setup 
 = /installdirectory/connx/libxx/libconnx32.so
installdirectory 
 is the location of  the CONNX UNIX client.
libxx 
 is the 32bit or 64bit lib directory.  For 64bit, the value will be 
 lib64.  For 32bit, the value will be lib32.
The extension of the libconnx32 
 file changes depending on the platform. The example shows .so 
 for Linux and Sun; other extensions are .a 
 for AIX, and .sl for HP-UX.
Threading = 2  Gives 
 the number of threads for multitasking. Minimum multitasking value is 
 2.

Save this information in the connxdriver.template file, then use the command: odbcinst -i -d -f connxdriver.template to register the driver with unixODBC.

  1. Create the connxdsn.template file:

The following example gives 
 the information needed to register a DSN with unixODBC. Enter this information 
 into a text file using your favorite text editor:
 
[CONNXDSN]  The 
 data source name, including the brackets.
Description = CONNX Samples Data Source  The description is treated as a comment; 
 it is not mandatory.
Driver = [CNXODBC] Since 
 you have registered the driver in the previous step, use the format Driver=[drivername]
DATADICTIONARY = /installdirectory/connx/samples.cdd 
 This is the path and filename for the 
 data dictionary. This file cannot be created or edited on a UNIX environment. 
 Create or edit this file on Windows, then ftp it to your Unix system.
APPLICATION = <application or database> 
 Your application or database type, 
 such as Adabas or CISAM.
If you are running multiple 
 applications or database types, leave this blank.
Trace = No  Turn 
 trace on (yes) for debugging.
TraceFile = sql.log  Ignored 
 if Trace = No; otherwise the trace output goes here.
UserName = CONNX user ID
Password = CONNX password
The UserName and Password can 
 be left blank. If they are blank, when you connect to CONNX, you will 
 be prompted for that information.

Save this information in the connxdsn.template file, and then use the command: odbcinst -i -s -l -f connxdsn.template to register the driver with UnixODBC.

  1. Use a query program to connect to the data source using the newly created DSN to retrieve data.

  2. The iSQL utility that enables you to test connections is installed with unixODBC. After you create a DSN, in preparation for connecting to your data source, run isql from a command prompt. The format for running isql is:

isql {cmd options} 
 [dsn name] {username} {password}  

 

For example:

 

isql 
 -v connxsample connx connx
  1. If the connection is successful, a "Connected!" message appears at the bottom of the screen. If the connection is not successful, the "[ISQL]ERROR" message appears. For more information on what to do if the connection fails, use the -v option (verbose mode) to analyze the problem.