iSeries systems and Ruby are separate universes right now; I know of no native Ruby way to connect to an AS400 system. However, with the help of Java we can bridge the gap.
Probably the simplest example is connecting to an iSeries system using JDBC to select from some tables, and with the right libraries it is straightforward. It’s also fun to be doing some nifty quick Ruby but with some preexisting and proven Java libraries.
Also, if you use Java and Ruby, definitely put arton’s RubyJavaBridge in your pocket; you’ll end up using it more than once.
What you’ll need:
- Ruby (well yea)
- Java (ok)
- access to an AS400 system (that’s the whole point here…)
For testing, I’ve been using a free account available from Holger Scherer Software und Beratung.
- jt400.jar jdbc drivers from JTOpen, a great open-source Java library for AS400 access.
- RubyJavaBridge is the keystone for this.
Installing the software is the hardest part of this exercise, but it’s more tedium than anything. Once you’ve got it all downloaded and running the fun can begin.
(more…)