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



Bryce,

I believe the DB2 Text Extender product (5722-DE1) supports "ranking"
of matches...

But it's an extra cost option...

I know that it's replacement at v6.1 and v7.1, OmniFind supports
ranking and is included in the OS free of charge.

What's the possibility you can upgrade?

Charles


On Tue, Oct 5, 2010 at 3:30 PM, Bryce Martin <BMartin@xxxxxxxxxxxx> wrote:
Thank you all so far for the information you've given me.  Maybe I need to
elaborate a bit more...

When I create my master list I need to "rank" the results.  To start, for
our version 1.0 it will give a +1 to the rank for a generic hit (think
LIKE in sql) and a +2 for an exact match (think = in sql).  So when I get
the results back I'll need to take each hit and add to that records rank
total in the master list.  Then return the results ordered by the "rank".
So each sql query is unique in that it causes some ranking.  So what this
does is the following...

The more fields the program recieves 1 - 7, the more we can narrow our
results.  We're talking about 165,000 records in the master file, that was
broken into my key,value files.  If I didn't have to do the ranking this
would be a whole different ball game.  This also allows for me to play
with each fields's search precision.  This will include names, addresses,
and phone numbers as possible search criteria so I'll eventually put some
smarts into my key,value tables and my search functions to handle S. =
south, St = street, st. = street, and on and on.  I want to architect this
from the start in the most flexible way possible.  Like I said, the
ranking is the tough part.


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



Aaron Bartell <aaronbartell@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
10/05/2010 02:47 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: I think I need multi-threading but I'm only on V5R4M5






Might also be worth looking at why your SQL might be performing badly
in the first place.  Maybe it just needs some tweaking?  Have you
tried Visual Explain in iNav for the SQL you are running?

Aaron Bartell
http://mowyourlawn.com
http://mowyourlawn.com/blog/



On Tue, Oct 5, 2010 at 1:41 PM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
wrote:
Hi Bryce,

The spawn() API will allow you to create "child jobs" that can be used
to do your searching.  They are _jobs_ (not threads) and will have the
start-up overhead associated with creating a new job (just as SBMJOB
does) but the jobs will be able to communicate back to with your master
job via pipes (or data queues, or whatever) and therefore you can use it
to compile your master list if you like.

I have no idea how well/poor that would perform.

You could also code your routine in a thread-capable language like C or
Java instead of using RPG. Then you could use multi-threaded support.

Though, I find myself wondering if it'd make much difference in
performance?  The only way to know, I guess, is to test it.


On 10/5/2010 12:43 PM, Bryce Martin wrote:
Well I have come upon a project where I think I need multi-threading in
RPGLE but I am only on V5R4M5.

Here is the scenario...
We have a file that we need to search.  There are 7 fields in each
record
that can be searched.  As few as 1 or as many as all 7 can be
specified.
What I've done is broken out these fields into Key,Value pairs for
faster
searching.  By keeping each searchable field as a seperate table ask
the
Key and having the key field from the main file as the Value.  I will
then
return all matching values to the main search program.

My basic structure would be something like....

if parm1<>  '';
  searchfield1()
endif;

if parm2<>  '';
  searchfield2();
endif;

....

if parm7<>  '';
  searchfield7();
endif;


Since each of these searches are on different files I want to be able
to
do them in parallel to speed it up.  Is there a way to do this without
doing a sbmjob.  I can't do the sbmjob since I need to gather the
results
of each searchfield procedure and then compile a master list.

Any idea will be appreciated.


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
--- This message (including any attachments) is intended only for the
use of the individual or entity to which it is addressed and may contain
information that is non-public, proprietary, privileged, confidential, and
exempt from disclosure under applicable law. If you are not the intended
recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us and
destroy this message immediately. ---

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--- This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us and destroy this message immediately. ---
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.