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



Why do you have different users using the same connection? Why wouldn't
you implement connection pools and then make it so that each job runs its
own instance of the programs so that you don't have this collision. And
another thing.... 2.147 billion records? No wonder you are having
performance issues. Any DB file with that many records is going to take
forever to processes. I think that instead of modifying your RPG code you
should take a look at reworking your java code so that you can have
multiple users. Its a transaction file you are searching over so its
obviously just an inquiry. There is no reason why this can be run as
independent instances.


Thanks
Bryce Martin
Programmer/Analyst I
Ext. 4777



"Jonathan Mason " <jonathan.mason@xxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/09/2009 07:50 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
<rpg400-l@xxxxxxxxxxxx>
cc

Subject
RRN and Database Files






We have an RPG400 program that reads through a JDE transaction file and
then returns consolidated data back to it's calling Java client. Each
time the program returns data to the Java client it remains open for the
next call and accepts a parameter that indicates where in the program it
needs to restart from.

Because of performance issues the call from Java was modified recently
so that instead of retrieving all transactions for a customer it now
retrieves blocks of 50 or so transactions.

This is now causing a further problem where multiple users are accessing
the same customers transaction list and the same Websphere connection is
used by both jobs in turn.

I need to modify the RPG program so that it positions the file back to
the last record read by the Java client regardless of whether the
program instance has been used by any other client.

I'm looking at using the RRN and passing this back to Java when I return
the data and then chaining with this when the program restarts and there
has been a change in client. I rarely use RRN processing, so this has
raised some questions:

1) If the logical file is defined as keyed in the program can I chain to
it using RRN or would I have to read the physical by RRN and then chain
to the logical using the key values picked up from the physical?

2) I can get the RRN from the INFDS, but looking through the manuals,
Google and the archives I keep seeing that the maximum size of a 4 byte
binary (integer) field is 2,147,483,647 (i.e. 2.147 billion records).
In RPG400 I have to use the INFDS to get the RRN for the record, but is
2.147 billion still the maximum number of records I can have in a file
or can I have more?

3) If the file can hold more than 2.147 billion records can I get the
RRN for these "additional" records within the RPG400 program or is the
larger RRN only available through the RECNO keyword in RPG IV?

Thanks in advance

Jonathan




_______________________________________________________
This message was sent using NOCC v1.14 webmail software
_______________________________________________________





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.