The same thing would not happen if i process the file in me RPG because of 
the simple reason that i would have closed the file in my RPG. You can try it 
out by putting the CPYFRMQRYF after calling the RPG.  
         Many people have suggested putting a *LOVAL SETLL in the RPG. 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. 
        I feel that IBM should fix up the CPYFRMQRYF to reposition the file 
pointer to the first record after it has done it's piece of work.

______________________________ Reply Separator _________________________________
Subject: Re: Problem in OPNQRYF
Author:  "James W. Kilgore" <qappdsn@ibm.net> at ARO-INTERNET
Date:    7/28/99 7:36 PM

Vini Kolathur wrote:. So
>      does that mean that IBM has to fix up the CPYFRMQRYF to clsoe the file 
>      after finishing it's work.
It means -you-  processed the whole file with the CPYFRMQRYF and -you- need to 
reposition the file cursor.
The same thing would happen in RPG if you opened a file, read it to EOF,  then 
you tried to read it some more received nothing.  Go figure ;)
If you want to start over again at the beginning of what the OPNQRYF creates, 
try a
SETLL *LOVAL at the beginning of your RPG program.  If you are processing the 
as a primary file, you will need to position the file cursor before you call 
RPG program.
All in all, it's working as designed.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
* This is the RPG/400 Discussion Mailing List!  To submit a new         * 
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   * 
* from this list send email to MAJORDOMO@midrange.com and specify       * 
* 'unsubscribe RPG400-L' in the body of your message.  Questions should * 
* be directed to the list owner / operator: david@midrange.com          * 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
| 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 thread ...


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

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