I did not see mention of a UDTF that Scott created.
http://iprodeveloper.com/print/rpg-programming/udtf-ifs-directories

Worked pretty well as I recall.

--
Bryan

On Jan 21, 2016, at 5:01 PM, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:

On Thu, Jan 21, 2016 at 3:09 PM, Jeff Crosby <jlcrosby@xxxxxxxxxxxxxxxx> wrote:
I have a project coming up in a month or so where I will want a list of
files in an IFS folder. I'm hoping I can get that file list this way.

I suppose it would be nice. I love the idea of exposing more things
via SQL (particularly when the easiest-to-use option thus far is a
system API), and it looks like IBM is on that path.

But while you wait for IFS handling to show up in the official DB2 for
i views and services (I'm guessing it will take longer than "a month
or so" for this to happen), you can do it yourself by wrapping up the
appropriate non-SQL code in UDFs or stored procedures.

If you don't want to wait, and you don't want to build your own
UDFs/SPs, you could stick solely to SQL by relying on QSYS2.QCMDEXC to
execute arbitrary CL commands (including the QSH command, to execute
arbitrary Qshell commands like ls with the > redirection operator).
You may also have to use QCMDEXC to do CPYFRMSTMF or CPYFRMIMPF.

It's the good ol' dump-and-read technique. Byzantine, especially in
this from-SQL incarnation, with probably tons of extra single-quotes
to keep track of, but doable.

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

Please contact support@xxxxxxxxxxxx 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.