|
Bryce,
While RPG might require THREAD(*SERIALIZE) at v5r4....
That doesn't preclude your RPG program from creating threads...
However, multi-threading is generally a hard concept to handle...
Additionally, it seems to me that you're thinking "old school"
here...to much consideration about how to get the data.
Assuming you have a 2+-way system and DB2 SMP enabled, check your
QQRYDEGREE system values and the PARALLEL_DEGREE value in QAQQINI,
then the system with multi-thread your query request on it's own.
Depending on the data, and how your 7 search fields interact (AND/OR),
having user created separate key/value tables may just be maintenance
overhead...it might be better to have 7 individual EVI indexes over
the 7 fields and let the system handle it for you.
Have you tried the "easy" solution?
Charles
On Tue, Oct 5, 2010 at 1:43 PM, Bryce Martin <BMartin@xxxxxxxxxxxx> 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.
As an Amazon Associate we earn from qualifying purchases.
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.