Yes, we cleaned up db2util project that Tony Cairns started:
[1]
https://github.com/IBM/ibmi-db2util
The output formats are pluggable, but currently there's no configuration
options for each format, but that could be added:
[2]
https://github.com/IBM/ibmi-db2util/issues/8 (Contributions welcome).
----- Original message -----
From: Bryan Dietz <bdietz400@xxxxxxxxx>
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxxxxxxxx>
Cc:
Subject: [IBMiOSS] new db2util rpm
Date: Fri, Mar 8, 2019 10:48 AM
I noticed a new RPM out there :
db2util
looking at the help and trying out looks like it will be very useful.
I think it could use a column name option for CSV and SPACE formats.
Like the ability to use parms.
Bryan
db2util [options] <sql statement>
Options:
-o <fmt> Output format. Value values for fmt:
json:
[{"name"}:{"value"},{"name"}:{"value"},...]
csv: "value","value",...
space: "value" "value" ...
-p <parm> Input parameter(s) (max 32)
-h This help text
-v Show version number and quit
Examples:
db2util "select * from QIWS.QCUSTCDT where LSTNAM='Jones' or
LSTNAM='Vine'"
db2util -p Jones -p Vine -o json "select * from QIWS.QCUSTCDT where
LSTNAM=? or LSTNAM=?"
db2util -p Jones -p Vine -o space "select * from QIWS.QCUSTCDT where
LSTNAM=? or LSTNAM=?"
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: [3]
https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [4]
https://archive.midrange.com/opensource.
Help support midrange.com by shopping at amazon.com with our affiliate
link: [5]
https://amazon.midrange.com
References
Visible links
1.
https://github.com/IBM/ibmi-db2util
2.
https://github.com/IBM/ibmi-db2util/issues/8
3.
https://lists.midrange.com/mailman/listinfo/opensource
4.
https://archive.midrange.com/opensource
5.
https://amazon.midrange.com/
As an Amazon Associate we earn from qualifying purchases.