× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I looked at changing CSVGEN to do this but in the end, the requirement disappeared (the customer switched to json) so I never did the work.

Modifying the technique used by IBM's HTML table generator is the way to do it - it is not a difficult task.


Jon P.

On Feb 28, 2024, at 4:30 PM, Greg Wilburn <gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

Thanks!

No need to apologize for helping me... I ran your statment in RSS after removing operators (like IFNUL on dates) and it gets the column names. Very cool. It also shows two rows for the join names, and a row for each of the join fields (two fields joined = 4 rows).

I could probably make that work. However, I had to move forward with this project (for now) and I'm just using my IFS tools to write it from RPG.

I spent some time looking at the DATA-GEN info on IBM's site. I was reading the example generator program. I don't quite understand it, but it seems like column headers are possible within the datagen program. I would need to modify the CSVGEN code to insert the column headings:

https://www.ibm.com/docs/en/i/7.5?topic=code-example-data-gen-generator

Specifically, in the "genStartTable" example procedure.

Very interesting.

Thanks again!
Greg



-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Bryan Dietz
Sent: Wednesday, February 28, 2024 3:51 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: CSVGEN?

sorry for not letting this go, but I'm curious if you could still "automatically" get the column names is you ran this:

select * from table (
qsys2.parse_statement('put your SQL in this space you''l have to add a quote to any single quotes in the SQL like field = ''ABC'' '));

https://www.ibm.com/docs/en/i/7.4?topic=services-parse-statement-table-function

I just ran across and tried on a couple of SQLs that I have that have joins.

Bryan

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.