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.
The standard IBM i SQL can output to *DISPLAY, *PRINTER, and *OUTFILE.
Our new SQL Query File tool can output to these as well as *PDF and *TEXT files.
I'm wondering what other output features would be helpful to end-user shops?
Currently we have the following output formats in plan:
These are just in our plans now, in order of importance to us. Are there other formats that are as important as these? Are these important?
How about *TAB delmited? Parsers can get confused when strings contain quotes but if the CSV is tab delimited, it's a piece of cake to parse, since users cannot enter tabs in any screens (web or 5250).
Chris Ringer
Chris. The existing coztools' CPYTOCSV allows TABS, but would you want it to be simply a text file (like a text version of a Report) but instead of the blanks between columns, there would be a TAB character, without any quotes or commas?
Correct. Tab delmited instead of comma delimited.
The way CPYTOIMPOF does it with STRDLM(*NONE) STRESCCHR(*NONE) FLDDLM(*TAB).
"Bob""s","Data" would instead just look like Bob"s<tab>Data
Chris
Okay. Got it. Thanks!
Bye the way, the Cozzi appTools has a csvparse() function that allows you to retrieve each "field" of a CSV record either by column name or by relative column number. I use it to import CSV data all the time.
Along with *CSV I'd add *DELIMITED
I've encountered two kinds of delimited files:
1) Delimited with quoted strings
User specified delimiter, anything can be the delimiter: vertical bar, equal sign, tab, whitespace, null, tilde, caret, some other user defined character or hex
Same idea but more flexible than CSV
2) Delimited with Escaped Delimiter
User specified delimiter (for example, backslash)
Doubling the delimiter escapes the delimiter
sometimes files from *nix systems can be like this
So maybe *DELIMITED would be *QOUTEDELIM and *ESCDELIM, or something like that.
It would also be useful to specify a Record Delimiter: null, cr, lf, some other user defined character or hex byte(s)
how about it putting out a new table OUTPUT(*TABLE)?
We already do that, clbirk.