|
Alternative is imbedded SQL. http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/info/rzajp/rzajpkickoff.htm or look for SQL at http://store.midrange.com/ Even then, the logical, (or index), may help the performance of the OPNQRYF or imbedded SQL. Pros/cons? Performance obviously. Additional indexes on a file may have a performance impact on the update of the based file. However, the impact is not nearly as significant as it was in the very early releases of OS/400. My personal preference is Imbedded SQL over OPNQRYF. I find it easier to understand and maintain, and the newcomers to programming seem to grasp it faster. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com "Malini Rao" <malini2005@xxxxxxxxxxxxxx> Sent by: midrange-l-bounces@xxxxxxxxxxxx 03/04/2005 10:40 AM Please respond to Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> To MIDRANGE-L@xxxxxxxxxxxx cc Subject Logical File or OPNQRYF or anyother way ? Here is a basic question as I am new to AS/400 I have a physical file which has millions of records, and this physical file gets updated quite frequently by various programs in the application. I have to develop 2 programs pertaining to an enhancement request. Program 1 Needs to read the file selectively based on two fields of the physical file , perform calculations on the selected records and update them. There is no existing logical file on the physical with these 2 fields as a key Program 2 Needs to read (only)the file selectively. File is opened in input mode only. Which is the more efficient method in each case - creating a logical file with the 2 fields as key or using an openquery with select on the 2 fields before each program is called. Any other efficient way ? Also :- What are the scenarios where a logical file is preferred over an open query file and vice-versa ? Thanks in advance Malini -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-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.