Accessing a AS/400 from Linux
It took me a long time to configure a Debian Box to access our iSeries. Here are the basics:
1. Install unixodbc
2. Install IBM iSeriesAccess
3. edit /etc/odbcinst.ini
[ODBC] Trace = No TraceFile = /tmp/sql.log ForceTrace = No Pooling = Yes [iSeries Access ODBC Driver] Description = iSeries Access for Linux ODBC Driver Driver = /opt/ibm/iSeriesAccess/lib/libcwbodbc.so Driver64 = /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so Setup = /opt/ibm/iSeriesAccess/lib/libcwbodbcs.so Setup64 = /opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so UsageCount = 1 CPTimeout = CPReuse = Threading = 2 DontDLClose = 1 FileUsage = 1 # TRACE = 31
4. edit /etc/odbc.ini
; see http://publib.boulder.ibm.com/infocenter/
iseries/v5r3/?topic=/rzaik/connectkeywords.htm
; ConnectionType=0 = Read/Write | 1 = Read/Call | 2 = Read-only
[AS400]
;CCSID=1208 ; utf-8 unicode
; 273 germany
CCSID = 819 ; latin-1
UNICODESQL = 1
Description = Production AS/400 Database
Driver = iSeries Access ODBC Driver
System = as400.example.com
UserID = ODBC_RW
Password = Hj12SDf7gZ
DefaultLibraries = SMKDIFP ; you have to change this
AllowDataCompression = 1
AllowUnsupportedChar = 1
ForceTranslation = 0
Trace = 0
TraceFile = /tmp/odbc.trace
Servername = as400.example.com
You now can type isql AS400 to access your machine.