× 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: OPNQRYF record count
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Mon, 15 Mar 99 18:41:23 +1100

Hello Roger,

I don't think your memory is faulty, you're just confusing two separate 
functions.  POSDBF can be used to 
reposition a file opened in CL provided EOF has not been reached IN THAT CL (as 
a result of RCVF).  Once 
CPF0864 has been sent to a CL program there is no way to reopen or process the 
file from the beginning.  The 
only techniques that work are:

        1) to create a controlling CL program and put the file I/O in a second 
CL program
        2) transfer control to the same CL program
        3) do the work in a language designed for file processing

Using CPYFRMQRYF file may put the file cursor at EOF but the CL program doesn't 
yet know that (CPF0864 not 
sent).  A subsequent RCVF may get EOF, however a POSDBF before the RCVF can 
reposition and let CL do it's 
thing.

Notice I didn't say definitive this time :) although it's pretty close.  I have 
noticed that CL file handling 
occasionally changes from release to release because I have code that used to 
be able to reposition after 
CPF0864 but hasn't worked since at least V3R1.  My current preferences are 
option 3 and option 2.

Regards,
Simon Coulter.

«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software         AS/400 Technical Specialists       «»
«» Eclipse the competition - run your business on an IBM AS/400.  «»
«»                                                                «»
«» Phone: +61 3 9419 0175      Mobile: +61 0411 091 400           «»
«» Fax:   +61 3 9419 0175      mailto: shc@flybynight.com.au      «»
«»                                                                «»
«» Windoze should not be open at Warp speed.                      «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
//--- forwarded letter -------------------------------------------------------
> X-Mailer: Internet Mail Service (5.5.1960.3)
> Date: Wed, 10 Mar 99 18:27:37 -0800
> From: "Roger Boucher" <RBoucher@stanpac.com>
> To: "'MIDRANGE-L@midrange.com'" <MIDRANGE-L@midrange.com>
> Reply-To: MIDRANGE-L@midrange.com
> Subject: RE: OPNQRYF record count

> 
> My memory may be fuzzy, but I could swear that even the POSDBF didn't
> work in this situation a few years back?  I seem to remember years ago
> being unable to find any way to reset the file to the beginning in a CL
> program, and I know I tried POSDBF.  I know it works now, because I just
> tested it!!!
> 
> Fuzzy memory?  Or has something changed?
> 
> Roger Boucher
> Standard Pacific Corp.
> rboucher@stanpac.com
> 714-668-4326

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