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



Yes. The variations in EBCDIC and ASCII alone would make for a very
lofty set of comparative routines, let alone the "assumption" of a
non-descript numeric value.

Regarding the Java suggestion (and Peter's C suggestion), my initial
thought was just to have the routine be part of a service program. As
Peter stated, C would probably provide a faster response and require
less overhead, albeit, possibly more code. I *assume* that the JVM
startup process could be limited to the service program, so the first
call would eliminate the lag in future calls, but I could be wrong. I'm
a student of RPG as a second, well maybe fifth, language. :) I
suggested the Java ArrayList class because it already contains methods
for adding, deleting and comparing objects of any Java type, AND because
I am more familiar with Java than C. :)

Regardless of the language, recreating the SQL IN() function in RPG will
provide a challenge to anyone that accepts it. It will be, at the very
least, interesting to read about the creative solutions that are
explored.

Tom Armbruster

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Rory Hewitt
Sent: Monday, March 08, 2010 10:53 AM
To: RPG programming on the IBM i / System i
Subject: Re: AW: More on RPG style

Tom,

Yeah, a challenge indeed. Currently, operational descriptors are only
passed
for character/graphic parameters. IN theory, therefore, I could
*assume*that if no OD is present for a parameter, then it's a numeric
value
(assuming I also specify OPDESC for the procedure). Plus, even if I do
pass
OD's, I won't be able to check for upper-case input etc.

As far as using a Java ArrayList goes, I don't know Java well enough to
implement this myself, but my *guess* would be that it would be much
slower,
what with the JVM startup and stuff.

On Mon, Mar 8, 2010 at 9:50 AM, Tom Armbruster <
tarmbruster@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Rory,

That's an interesting thought. It would be a challenge to account for
all of the variations.

I'm sure I'll be drawn and quartered for suggesting this, but wouldn't
it be easier to use something like a Java ArrayList for this instead
of
trying to reinvent the wheel in RPG? Just a thought. I'm not an
expert
on Java performance in RPG. Maybe it's even worse than embedded SQL.


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.