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


  • Subject: RE: Problem in OPNQRYF
  • From: Buck Calabro <mcalabro@xxxxxxxxxxxx>
  • Date: Fri, 30 Jul 1999 17:01:44 -0400

>>          Many people have suggested putting a *LOVAL SETLL in the RP
>>  This
>> would only crash the program because the *LOVAL SETLL will try to
>>  position it to
>> the first record. This necessarily could not be the first record in
>>  the
>> selection criterion.

The key sequence and the selection criteria are unrelated.  I can do a
QRYSLT(STATUS='Y') and KEYFLD(CUSTNO).  *LOVAL SETLL will position me to the
first record of the customers having STATUS='Y'.  This will be the record
with the lowest customer number.

>>         I feel that IBM should fix up the CPYFRMQRYF to reposition t
>>  file
>> pointer to the first record after it has done it's piece of work.
>>
>
>Its not a bug in CPYFRMQRYF!   I have about a dozen programs that I
>use that have worked great since V2R2, and would stop working if
>IBM changed this behavior!  This is the way it was designed to work,
>its the way its always worked, and theres no reason to change it.

I have programs doing this from System/38 days, maybe release 6 or 7.  It
always worked like this and it's supposed to work like this.  That's how
shared open files work. 

>The whole IDEA behind OVRDBF SHARE(*YES) and using an OPEN file,
>that you have to CLOF to close is that you can keep reusing it
>without having to close the file!   Thats the whole reason it exists!!

Shared opens exist so that multiple programs can position the file pointer
without having to do a full open.  It is a performance enhancement.  Try it
- you'll like it!

Buck Calabro
+---
| 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
+---END



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.