× 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 8/30/2016 12:13 PM, John Yeung wrote:
Buck, I'm in general agreement with your response to this:

I can access my DB2 files on the IBM I and display data, but haven't figured out the set up to access text files on a PC (using SQL).

But I think it's worth backing up a bit.

Let's recall, the *first* thing he said was:

I had the awesome idea to use SQL in RDi to import data into a DB2 file from a text file on a network drive.

This doesn't make a lot of sense to me. First, I am not sure what "SQL
in RDi" means. The best I can come up with is that he wants to type
SQL statements into RDi, and have RDi execute those statements as a
script.

Yes. This is new in RDi 9.5, and it's intended as an iterative
development aid. You highlight an SQL statement in your RPG program,
context click and pick the 'Run SQL' choice and RDi opens the ACS SQL
Script tool where you can hone that statement until it works as you
wish. It's not really intended as a PC to DB2 bridge, or even as a day
in, day out query tool. But I kind of like the out of the box thinking!

The rest of it I parsed as:

(1) I've got some data sitting in a text file on a network drive (not on the i).
(2) I can access that text file from the PC which I'm running RDi on.
(3) I'd like for the data that's in the text file to somehow wind up
in a DB2 file on the i.
(4) Somehow SQL and RDi are involved in (3).

Yeah, that's how I read it too.

I don't feel really good about how I've read this because SQL is not
known for its text-file-processing prowess (or, if it's a CSV file or
XML file, why wasn't it referred to as such?) and because I keep
hearing folks recommending other ways to execute SQL scripts. (Though
honestly, I hardly pay attention, because I always just use Python for
both of those things.)

Now, misgivings aside, if I've read it correctly, then he doesn't need
the PC to "serve" SQL. He just needs to be able to issue INSERT
statements from the PC which take effect on the i (which is the normal
relationship where the i is the server and the PC is the client).

True!

I'm still scratching my head about the whole thing, though. If I've
read it correctly, then a Python script (using ODBC) would be PERFECT
for what he wants to do.

Yes, that would solve his business problem. But I think he was
interested in understanding how to set up the JDBC connection from RDi
to... well elsewhere. A learning experience as well as 'solve a
problem'. But I might be projecting :-)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.