Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
CSV, HTML or JSON?
has no ratings.
Published: 09 Jun 2015
Revised: 17 Jun 2015 - 1104 days ago
Last viewed on: 24 Jun 2018 (2119 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

CSV, HTML or JSON? Published by: Bob Cozzi on 09 Jun 2015 view comments(6)

I've completed work on CSV, Sylk (Excel), HTML and other file conversion formats.

I am now beginning my task of creating JSON directly from an SQL statement over DB2 for i.

IBM has announced JSON support, however their API does NOT create JSON from db2 files, it only stores, searches and returns JSON content stored in a BLOB within a DB2 file. Good for certain things, but not what I'm looking for.

I need to be able to create JSON directly from a delivered SQL statement, such as:

SELECT cstnbr,cstname,addr1,addr2,city,state,zipcode FROM mlib/customers order by zipcode

Once the SQL statement produces its resultset, I would deliver the records in JSON format to the caller or write them to STDOUT (the web).

QUESTION: Am I off track here? Don't we need db2-to-JSON?

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS