Command line tool to query an AS/400 server and return results as JSON. It uses the JTOpen Java library from IBM.
It was created to extract data from an AS/400 for consumption into a web application built on CouchDB.
Build is automated using Gradle.
To configure the eclipse project, launch:
gradle eclipse
and import the existing project in Eclipse.
Use gradle distTar
to build a distributable package. Use gradle installApp
to install into build/install/
.
Create a local.properties
file in the working directory. Look a Property.java
for an enumeration of all properties.
Put your queries in a queries
folder in the working directory: a query named onequery
is found into queries/onequery.sql
.
Each query is parsed with MVEL as an MVEL template. The parameters are taken from the command line as parameter=value
pairs.
To run the query onequery
with parameters a=b
and c=d
use:
./bin/As400Querier onequery a=b c=d