Using the unixODBC Driver

  1. Download an ODBC driver for UNIX. 64-bit platforms require unixODBC version 2.2.12 or later.

    Micro Focus has tested with "unixODBC" from www.unixodbc.org/unixODBC-2.2.11.tar.gz.

  2. Copy the unixODBC*.tar.gz file to a location in which you have permission to create files and directories.
  3. Enter gunzip unixODBC*.tar.gz.
  4. Enter tar xvf unixODBC*.tar.
  5. Read the readme file located in the directory from which the package was extracted and any other readme files with a suffix that describes your operating system (for example, readme.aix for IBM.AIX).

    These directions are provided for a basic 32-bit Linux (Intel x86) installation.

  6. Read the install file for prerequisites and installation instructions.
  7. Enter configure and wait while features on your system are being checked.
  8. Enter make and wait for the package to be compiled.
  9. Enter make install to install programs, data and documentation.
  10. Enter odbcinst -j to find out where your SYSTEM and USER data sources are located.

    Here is location information from a Linux system:

    DRIVERS............: /usr/local/etc/odbcinst.ini
    SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
    USER DATA SOURCES..: /home/techsup/.odbc.ini 
  11. Add the following to the file in which your SYSTEM data sources are located (for example, /usr/local/etc/odbc.ini):
    [ODBC Data Sources]
    mf_sys = VORTEXodbc to MF
    [mf_sys]
    Driver = %GENESIS_HOME%/bin/mfdbc.so
    Description = VORTEXodbc to MF
    LoginID = system
  12. In your $GENESIS_HOME/lib directory, create another odbc.ini file with the following information:
    rem -------------- VORTEXodbc
    fetch_buffer_size  8192              -- fetch buffer size (in bytes)
    columns            256               -- max # of database columns
    logical_cursors	   1024              -- max # of logical cursors
    db_cursors         64                -- max # of DB cursors
    #if information is local use:
    dsn_mf_sys    "acuxdbc04:%s/%s/GDS10:mfdbc.cfg"
    #if information is on a server use:
    dsn_mf_sys  "acuxdbc03:%s/%s/GDS10:mfdbc.cfg@20222:servername!acuxdbc04
  13. Set the operating environment variables VORTEX_HOME and GENESIS_HOME to the root installation directory of Micro Focus XDBC. The following is an example of how to set these variables:
    export VORTEX_HOME=INSTALLATION_DIRECTORY
    export GENESIS_HOME=INSTALLATION_DIRECTORY
    CAUTION:
    \ value of the environment variable should not have a "/" as the last character, because this can interfere with installation and configuration scripts.
  14. Try to access a sample data file using a utility that came with unixODBC. To run the test, enter isql mf_sys system manager.

    A successful connection looks like this:

    Connected!
    sql-statement
    help [tablename]
    quit

    Then, enter

    SELECT * FROM pets

    This should retrieve the 19 records contained in the pets file:

    SQL (/? for help) ==> select * from pets;
    
     PATIENT_ID PATIENT_NAME   ANIMAL_TYPE  BREED              TREATMENT  OWNER_ID
     ---------- -------------- ------------ -------            ---------- -----------
     1          Cinnamon       Cat          Tabby              1          624
     2          Nutmeg         Cat          Tabby              2          550
     18         Shotzi         Dog          Schnauzer          1          704
     36         Cinder         Dog          Poodle             4          221
     54         Buster         Cat          Siamese            1          377
     72         Missy          Bird         Parakeet           6          309
     102        Kit            Dog          Shiba Inu          1          600
     160        Milo           Dog          Chow               4          522
     161        Puzzle         Reptile      Ball Python        3          522
     328        Copper         Dog          Golden Retriever   4          618
     377        Scooter        Cat          Domestic Shorthair 2          357
     378        Scrapper       Cat          Devon Rex          2          357
     379        Abbie          Cat          Maine Coon         2          357
     480        Princess       Reptile      Iguana             1          309
     503        Polly          Bird         Senegal Parrot     6          625
     504        Diego          Bird         Red Lory           4          625
     505        Alexi          Bird         African Grey       4          625
     801        Hammy          Rodent       Gerbil             3          700
     802        Rodney         Rodent       Hamster            4          700
    
    SQL (/? for help) ==>