I Access

Tier2.IAccess History

Show minor edits - Show changes to output

April 22, 2015, at 06:12 PM EST by 129.42.161.35 - Update docs taking in to account ACS Linux AP changes
Changed line 3 from:
!!! ODBC connect to IBM i
to:
!! ODBC connect to IBM i
Changed lines 7-56 from:
to:
!! Platforms
Driver is available for the following platforms:

* Windows
** [[http://www-03.ibm.com/systems/power/software/i/access/windows.html | IBM i Access for Windows 7.1]]
** [[http://www-03.ibm.com/systems/power/software/i/access/solutions.html | IBM i Access Client Solutions - Windows Application Package]]
* Linux
** [[http://www-03.ibm.com/systems/power/software/i/access/linux.html | IBM i Access Client Solutions - Linux Application Package]]

!! Installation

* Windows
For IBM i Access for Windows, run the exe for your platform (64-bit/32-bit)

For the Windows Application Package:
# unzip the zip file and run the exe for you
# cd to Image64a or Image32, depending on whether you're on 64-bit or 32-bit Windows
# run the setup.exe

* Linux
Packaged as zip file like IBMiAccess_v1r1_LinuxAP.zip
Zip file contains rpm and debs for various architectures: i386, x86_64, ppc, ppc64, ppc64le

If on rpm-based distro (RHEL, SLES, CentOS, Fedora, openSUSE, ...) install the rpm using your package manager:\\
eg. [@zypper in ibm-iaccess-1.1.0.3-1.0.x86_64.rpm@] \\
eg. [@yum install ibm-iaccess-1.1.0.3-1.0.x86_64.rpm@] \\
\\
Or rpm, but you'll need to dependency resolution yourself...\\
[@rpm -ihv ibm-iaccess-1.1.0.3-1.0.x86_64.rpm@]

If on deb-based distro (Debian, Ubuntu, Mint, ...) install the deb (NOTE: debs only currently built for Intel/x86 not POWER) \\
[@dpkg -i ibm-iaccess-1.1.0.3-1.0.amd64.deb@]

Run apt-get to install any dependencies and finish configuring things \\
[@apt-get install -f@]

Additionally, there are 32bit packages that can be co-installed with the 64-bit packages to enable both 32-bit and 64-bit applications to use the driver. These are suffixed with -32bit on the name\\
eg. [@ibm-iaccess-1.1.0.3-1.0.x86_64.rpm@]

!! Configuration

On both Windows and Linux, the driver is registered with the Driver Manager automatically during installation. On Linux, it may not be installed if odbcinst is not found.\\
To fix, run the following command: [@odbcinst -i -d -f /opt/ibm/iaccess/unixodbcregistration@]

!!! Creating a DSN
On Windows you can use ODBC Data Source Administrator in the Administrative Tools folder of the Control Panel

On Linux, you can create a DSN using the ODBCConfig GUI if your distribution still has it or edit the configuration files manually

First, run [@odbcinst -j@] to show where your paths are:
Changed lines 58-89 from:
Linux instructions (similar for Windows):

Q: How do i setup my odbc connection?
A: edit the /etc odbc files

Tip: On my Linux machine I copied CA drivers
to /usr/lib avoiding "LD_LIBRARY_PATH" (do this) ...
> sudo cp /opt/ibm/iSeriesAccess/lib/* /usr/lib/.

>sudo gedit /etc/odbcinst.ini
[iSeries Access ODBC Driver]
Description = iSeries Access for Linux ODBC Driver
Driver = /usr/lib/libcwbodbc.so
Driver64 =
Setup = /usr/lib/libcwbodbc.so
Setup64 =
UsageCount =
CPTimeout =
CPReuse =
Threading = 2
>sudo gedit /etc/odbc.ini
[myibmi]
Description = iSeries os400
Driver = iSeries Access ODBC Driver
System = myibmi.somewhere.com

Q: How do I test my odbc connection?
A: use odbc tool isql
>isql myibmi MYID MYPASSWORD

Q: how do i use with PHP
A: download the pear test cases and study odbc
to:
kadler@kadler:~$ odbcinst -j
unixODBC 2.2.14
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /home/kadler/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
Changed lines 69-77 from:


!!! Linux ODBC may already run, but
...
Linux distributions often include a default ODBC driver already configured (see check below), however as you use these "out of the box" Linux ODBC drivers you may find they fall short of IBM i specific needs (or you see issues). Therefore you may want to avoid headaches by starting with ODBC drivers from iAccess product (build by IBM i folks at Rochester). This page gives you an idea what you need to get started with iAccess ODBC.

Linux true 64 bit ODBC manager may have trouble running iAccess 64 for Linux. For most 64-bit platforms, you can also install the 32-bit version. Whichever one you install, the last one installed will become the default ODBC driver. See the unixODBC configuration file, odbcinst.ini, for more information. [[ http
://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frzaik%2Frzaikodbc64bitconsiderations.htm | iAccess 64 issue]]

!!! Check your odbc configuration
Walk before we run ... check if client access ODBC is working from command line.
to:
On this system, system-wide DSNs go in /etc/odbc.ini and user-only DSNs go in $HOME/.odbc.ini

The most minimal configuration needed is
:
Changed lines 73-75 from:
Q: How do I test my odbc connection?
A: use odbc tool isql
>isql myibmi MYID MYPASSWORD
to:
[<dsn>]
Driver          = IBM i Access ODBC Driver
System          = <system hostname>
Added lines 77-85:

For a list of DSN options, see [[http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzaik/connectkeywords.htm?lang=en | this ]] section of the Knowledge Center

!!! Verifying configuration
On Linux you can verify using isql or iusql:

[@isql <dsn> <username> <password>@]

Changed line 89 from:
$conn = odbc_connect("myibmi","MYUID","MYPWD");
to:
$conn = odbc_connect("<dsn>","<username>","<password>");
Changed lines 93-148 from:
'''odbc configuration (if you need help)'''

Your configuration probably already works, but for those that need Linux instructions ...

First go get odbc iAccess drivers at this link ... [[http://www-03.ibm.com/systems/i/software/access/linux/index.html | {iAccess ODBC Drivers}]]. When installing iAccess on my Linux machine I copied IBM CA drivers to /usr/lib avoiding "LD_LIBRARY_PATH" (do this please to save hours of fustration) ...
[@
> sudo cp /opt/ibm/iSeriesAccess/lib/* /usr/lib/.
@]

[@
Q: How do i setup my odbc connection?
A: edit the /etc odbc files

1) drivers ...
>sudo gedit /etc/odbcinst.ini
[iSeries Access ODBC Driver]
Description = iSeries Access for Linux ODBC Driver
Driver = /usr/lib/libcwbodbc.so
Driver64 =
Setup = /usr/lib/libcwbodbc.so
Setup64 =
UsageCount =
CPTimeout =
CPReuse =
Threading = 2

2) names of IBM i machines (myibmi) ...
>sudo gedit /etc/odbc.ini
[myibmi]
Description = iSeries os400
Driver = iSeries Access ODBC Driver
System = myibmi.somewhere.com
@]

'''64bit'''
[@
Note: If 64-bit Linux use Driver64/Setup64, but you need to run a 64bit Zend Server.
Also, If you have a 64-bit Linux machine copy the /opt/ibm/iSeriesAccess/lib64/* drivers.

oh, crikey!
Windows/WOW64, same rule applies Zend Server 32bit (no Windows Zend Server 64bit available),
... my Windows 64bit telly is on the fritz again, but i think the second one (Wow6432Node):
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI"
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI"
@]

!!! Install PHP on your PC/laptop
Step 1) Download Zend Server ...
* [[http://www.zend.com/en/downloads/ | {Zend Download site} ]] - Zend Server Community Edition
** ... click download for your laptop (Linux, Mac, Windows)
* Install Zend Server on your laptop
** php-x.x-extra-extensions-zend-server -- Linux install extra to run odbc
* Administration
** [[http://devzone.zend.com/1389/getting-started-with-zend-server-ce/ | {getting started}]]

to:
!! 64-bit Considerations for Linux

* If you're using pdo_odbc prior to PHP 5.6, there is a [[https://bugs.php.net/bug.php?id=50444 | bug]] that will cause random crashes
* If you're using the old iSeriesAccess rpm '''you will have problems''':
** ODBC driver links against older odbcinst.so.1, causing rpm dependency errors
** Not fully 64-bit compliant (32-bit SQLLEN parameters) causing random crashes when using modern unixODBC
** Hasn't been updated in years, many fixes and improvements missing
** No Debian/Ubuntu support

Changed lines 104-105 from:
[--Tony "Ranger" Cairns - IBM i PHP / PASE--]
to:
[--Tony "Ranger" Cairns - IBM i PHP / PASE--][[<<]]
[--Kevin Adler - IBM i PASE / DB2 / ODBC
--]