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



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.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.