This week a colleague and myself have been working hard to create a Ruby extension which allows Ruby to make RPC calls to UniVerse and UniData (the IBM U2 databases). The module has been dubbed U2, the class UniRPC. It implements the intercall interface, and from that the functions: open, close, opensession, quit, readlist, execute, read, write & delete. Within the c-code it translates the @FM separated records (and readlists) into Ruby Arrays (for easy access). It currently does not translate @VM, @SM & @TM to sub-array structures, but maybe one day…

We’ve also created a ActiveRecord-like class to work with U2 files (tables & records) all in all pretty interesting!!

4 Responses to “U2 Ruby: Ruby integration for IBM UniVerse and UniData”

  1. Keith Veleba Says:

    I’m in need of doing something similar for a project on which I am working. Can you point me to some good resources for doing things like this?

    As some point in the future, will your work be available as a product?

    Thanks, Keith Veleba

  2. Tom de Grunt Says:

    Hi Keith,

    Well it’s probably not going to be released as a product, though I myself would not have any problems with that, but my employer probably will. I’m still investigating whether I could write an article about this with IBM developerWorks, but that’s also still not sure.

    Tom

    PS On resources: ONLamp.com article U2 Library: InterCall Developer’s Guide

  3. Les van Kanten Says:

    I’ve tried hooking up to Unidata via Rails without luck. There’s an IBM Unidata Driver for ODBC, and using that connection with the sqlserver adapter, it connects but fails when ActiveRecord tries to run SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = ‘BASE TABLE’;

    Error: Qualified table names are not yet supported: INFORMATION_SCHEMA.TABLES.

    -Les

  4. CD music Says:

    Hello, nice post. Bookmark it.

Leave a Reply