Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Query tool for as400 returning JSON objects.

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

As400Querier

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.

Development

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/.

Usage

Configuration

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.

Running

To run the query onequery with parameters a=b and c=d use:

./bin/As400Querier onequery a=b c=d
Something went wrong with that request. Please try again.