At 08:45 PM 11/27/1997 -0600, you wrote:
>In message <>, From Chris Rehm 
><>, the following was written:
>> I would have made the opposite
>> assumption, feeling that if I specified a logical it was because the 
>> records I wanted from the file were are subset of that logical. 
>You're safe here. Even though QQQQuery might use a different access path
>to improve performance, it will only return rows that are included in
>the access path that you specify, and the columns that are returned will
>always be based on the view that you specify.

There are at least 2 ways to go here, I think. If you know a certain
logical gives you the view you want (field list, S/O criteria), then
specify that logical in the SQL statement. This behaves something like an

OTOH, you can specify the physical and use the WHERE clause to specify the
same criteria as the S/O. In this case, I believe the optimizer will try to
use the appropriate access path, including the possibility of the S/O logical.

The latter approach fits in better, it seems, with standard SQL practice.
It seemed easier in one of our projects to communicate to an outside
contractor in the second way, than to try to say too much about
AS/400-specific stuff around logical & physical files with everything that


Vernon Hamberg
Systems Software Programmer
Old Republic National Title Insurance Company
400 Second Avenue South
Minneapolis, MN  55401-2499
(612) 371-1111 x480

| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "".
| To unsubscribe from this list send email to
| Questions should be directed to the list owner/operator:

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by 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].