|
If this file has only a few records, load it at init to a table. The first field in the table is the unique key. The second is the length of the entire record format. I use an externally described DS and move the second field to the DS to get the record layout. Another solution, if you have amble memory, is to create a memory partition large enough to hold the entire file. Then a small program reads the entire file and goes into a wait. If this is the only job run in the memory partition, it will remain cashed in memory. Other jobs will take advantage of this. Yet another way is to load the file into a keyed data queue and use the message peek to retrieve the record without removing it. If the application will allow, presort the master file by the key of the aux file and only read the aux file at level break. We use a mixture of all. What I have not tried is a user space, but that is another possibility. Hope this gets you think-in. Christopher K. Bipes mailto:ChrisB@Cross-Check.com Sr. Programmer/Analyst mailto:Chris_Bipes@Yahoo.com CrossCheck, Inc. http://www.cross-check.com 6119 State Farm Drive Phone: 707 586-0551 x 1102 Rohnert Park CA 94928 Fax: 707 586-1884 If consistency is the hobgoblin of little minds, only geniuses work here. Karen Herbelin - Readers Digest 3/2000 -----Original Message----- From: Contractor1@parkdalemills.com [mailto:Contractor1@parkdalemills.com] Sent: Monday, July 17, 2000 10:17 AM To: RPG400-L@midrange.com Subject: Accessing a file in memory We have a project where a few files are accessed a lot in a job stream and the job takes over an hour to run. We are looking for ways to speed up the process. We are wanting to load the few files into memory rather than accessing the files off the disk because we heard that a company that purchased the same software did the same. Can you advise us on what might be the best solution? User space, what? Thank you, Patrick Conner www.ConnecTown.com (828) 244-0822 +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.