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



>I'm going to be receiving transmissions from laptop PC's.  The
>transmission will be a file with various record types which are:
>
>       orders
>       payments
>       pickups
>       Email
>       host file maintenance
>
>These will be processed into various host files by my RPG program. 
>Altogether, there are 16 host files in use defined in the program.  Each
>of the above record types is placed into a different host transaction
>file, and requires different host files for editing, reference, etc.
>
>Question 1
>==========
>Nine out of 10 transmissions will be orders only.  That means 90% of the
>time, at least 9 of these files will not be used at all when the program
>is invoked.  I assume that making those 9 files USROPN will improve the
>performance of the program because I will only open those files if and
>when needed.  Correct?
>
Correct.  It will reduce the time it takes to load and terminate the program.

This principle can be applied to interactive programs as well.  As an
example, have you ever had a program which takes forever to display the
first screen and then it runs fine?  Frequently that is a program with a
large number of files, all of which have to be opened before displaying the
first screen even though data is not needed from all the files to get the
first screen out.  You can achieve a tremendous performance improvement by
making all of the files which do not contain data for the first screen as
user defined open files.  Then WRITE the first screen, OPEN the rest of the
files, and READ the first screen back in.  The first screen is displayed
instantly provided FRCDTA was specified on the screen record format or the
screen was compiled DFRWRT(*NO).



>Question 2
>==========
>Probably 999 times out of 1000, there _will_ be orders in this
>transmission.  There are 7 files that are needed to process orders and
>therefore will be opened 999 out of 1000 times this program is invoked. 
>If I make these 7 files (that are used virtually every time) USROPN as
>well and open them only if needed, will that be a performance _hit_ of
>any kind over not defining them as USROPN?
>
I don't think there is much difference between opening a file with the OPEN
operation and letting the RPG cycle open it for you.  However, I have not
tested this.

>Thanks.
>
>
>-- 
>-Jeff
>
>jlcrosby@fwi.com
>+---
>| This is the Midrange System Mailing List!
>| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
>| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
>| Questions should be directed to the list owner/operator: david@midrange.com
>+---
>
>


Charlie Massoglia, Massoglia Technical Consulting, Inc.
PO Box 1065, Okemos, MI 48854, USA
517-676-9700  Fax: 517-676-1006  EMAIL: cmassoglia@voyager.net


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 thread ...

Follow-Ups:

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.