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



Buck,

Go ahead and burst my bubble. You're correct as far as I recall, that's what the RDi tool is for, BUT, with all the ways a connection can be configured, I was hoping that one of them might work.

Both you and John read me correct. That sounds pretty much what I want to do.

SQL to me is a great tool for data manipulation. I'm a big fan of RPG also. Between the two of them, I can get done about 99% of what I need to do to get my work done. (Forgetting that I must do it on a PC with a connection of some sort to an internet, data storage, etc.) It's whether or not I can use the fastest, shortest path to get something done and the ability to use SQL in this instance would have been a shortest path, IMHO.

I might entertain the idea of PYTHON if I knew anything about it other than the little I've read about in emails from other IBM i developers. But I was asking about SQL in RDi, so learning PYTHON is not a viable option at this time. I'll tuck that into my pocket for future consideration. How much time would it take to learn it? Anybody got a good primer?

Thanks for listening.

duane


-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: Tuesday, August 30, 2016 1:05 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] Making the most, or over-thinking it - SQL for uploads

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 :-)

--
--buck

Visit wiki.midrange.com and register for an account. Edit a page that helps you, and because it's public, you'll help someone else, too!

--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.

________________________________
________________________________
CONFIDENTIALITY NOTICE: This electronic message transmission is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this transmission, but are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited. If you have received this e-mail in error, please contact NALC Health Benefit Plan at 703-729-4677 and delete and destroy the original message and all copies.





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.