Using perl/php with DB2, unixODBC and AS400: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
http://www-03.ibm.com/systems/i/software/access/linux/ | http://www-03.ibm.com/systems/i/software/access/linux/ | ||
</pre> | </pre> | ||
= ODBC Setup = | |||
Setup ODBC to reflect your DB-settings on the AS/400 | |||
run #odbcinst -j | |||
to see where your install files are located | |||
This is my setup | |||
<pre> | |||
[AS400] | |||
Description = iSeries Access ODBC Driver | |||
Driver = iSeries Access ODBC Driver | |||
System = 10.0.0.1 | |||
UserID = | |||
Password = | |||
Naming = 0 | |||
DefaultLibraries = QIWS | |||
Database = | |||
ConnectionType = 0 | |||
CommitMode = 2 | |||
ExtendedDynamic = 1 | |||
DefaultPkgLibrary = QGPL | |||
DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512 | |||
AllowDataCompression = 1 | |||
LibraryView = 0 | |||
AllowUnsupportedChar = 0 | |||
ForceTranslation = 0 | |||
Trace = 0 | |||
</pre> | |||
'''Note''' | |||
* [AS400] is the DSN (without the []) used when making ODBC connections | |||
DefaultLibraries = QIWS is a test db which AS400 has. Use this to test connections/queries. | |||
Change back to QGPL when ready for live work. |
Revision as of 07:42, 26 June 2009
Install prereq software
We need a bit of software installed to get up and running. Grab:
yum install unixODBC
iSeries Access for linux
This package contains the basics for connecting to an AS/400 via an 5250 emulator + unixODBC drivers and sql utils.
We need this to create/use our unixODBC. This is under IBM license, but otherwise a free download. You do need to register on their site tho.
Grab from here:
http://www-03.ibm.com/systems/i/software/access/linux/
ODBC Setup
Setup ODBC to reflect your DB-settings on the AS/400 run #odbcinst -j to see where your install files are located
This is my setup
[AS400] Description = iSeries Access ODBC Driver Driver = iSeries Access ODBC Driver System = 10.0.0.1 UserID = Password = Naming = 0 DefaultLibraries = QIWS Database = ConnectionType = 0 CommitMode = 2 ExtendedDynamic = 1 DefaultPkgLibrary = QGPL DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512 AllowDataCompression = 1 LibraryView = 0 AllowUnsupportedChar = 0 ForceTranslation = 0 Trace = 0
Note
- [AS400] is the DSN (without the []) used when making ODBC connections
DefaultLibraries = QIWS is a test db which AS400 has. Use this to test connections/queries. Change back to QGPL when ready for live work.