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



and taking it one step farther and creating the IFS file

call qsys2.ifs_write_UTF8(
path_name => '/tmp/listagg.csv',
line => (SELECT LISTAGG(CAST(Qsys2.Delimit_Name(Column_Name) AS CLOB(1M)), ', ') WITHIN GROUP (ORDER BY
Ordinal_Position) AS Column_List FROM Qsys2.Syscolumns2 C
WHERE Table_Name = UPPER('QCUSTCDT') AND Table_Schema = 'QIWS' AND Hidden = 'N' ),
overwrite => 'REPLACE');


Bryan



Bryan Dietz wrote on 2/28/2024 1:26 PM:
I recall taking the file name being inputted and execute the following SQL to start the CSV creation process.

SELECT
    LISTAGG(CAST(Qsys2.Delimit_Name(Column_Name) AS CLOB(1M)), ', ') WITHIN GROUP (ORDER BY Ordinal_Position) AS Column_List
    FROM Qsys2.Syscolumns2 C
    WHERE Table_Name = UPPER('QCUSTCDT')
          AND Table_Schema = 'QIWS'
          AND Hidden = 'N' ;

Greg Wilburn wrote on 2/28/2024 1:10 PM:
I thought it appropriate to start a different thread...I've moved on from systools.generate_spreadsheet.

Maybe this belongs in RPG forum?



I'm currently experimenting with Scott's CSVGEN using DATA-GEN, but I'm not sure how to get column headings using this method.

I was hoping it worked like YAJLDTAGEN that uses the DS names.


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.