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