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



Let me carry this discussion on a bit further, although it's really not
related to the original post.

I'm working on a small project that converts promotional information to XML
for use in our website.  So I pulled together some Java classes from an
outside source that can write good XML (no point in reinventing that wheel)
and wrote a simple Java program that reads the AS/400 files and calls the
XML-writing classes.  Now, this "simple" Java program has seven
PreparedStatements (that's my answer to the original post) that get the
relevant data from seven different AS/400 tables.  I don't like this
solution much; first, there's the reasons that you have for deprecating SQL,
and second, it doesn't show up in our source management system which tells
us which programs use which files and how.

You would suggest, I think, to replace each of these SQL statements by a
call to an RPG program.  That would help out with the source management
issue.  But I'm not entirely sure what that RPG program would look like;
would I be writing a new one for each SQL statement I needed, or would there
be just one program per table?

I'm thinking of a different approach to this problem.  We have no intention
of moving our production systems from the AS/400, and there's no reason for
my program to run on any other system than the one where its data is
located.  I have heard that RPG in V5R1 will include the ability to create
Java objects and call their methods.  So why shouldn't I write the program
in RPG, access the database in the usual way, and have it create a Java
XML-writer object and call the appropriate methods?  Not especially OO, I
admit, but the object that encapsulates our 166-field inventory item file is
a LONG way off.

Regards
PC2

-----Original Message-----
From: Joe Pluta [mailto:joepluta@PlutaBrothers.com]
Sent: October 4, 2001 06:21
To: java400-l@midrange.com
Subject: RE: SQL update/insert for a string contain " ' "


I respectfully suggest you consider replacing SQL with calls to an RPG or
COBOL program.  While it's a little bit of upfront work, it's far easier to
maintain in the long run, and performs much better.

Joe


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.