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



I don't believe %EOF is set if you do an FEOD followed by a READ to the
file.
I believe you'll get the "reading past end-of-file" error, but I am not
certain.
-Bob


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Michael
Sent: Sunday, November 28, 2004 8:43 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: EOFW not resume

Background:
===========

*** Physical file
contains record with different status (e.g. OS, ER, SD...).

*** Logical file
selects only records which status='OS' from the physical file.

*** RPG program
monitors logical file for records status='OS' continuously.  I am
using EOFW for this purpose.

Code:
=====
C*  Read the logical file GWRQCTL1
C                   READ      GWRQCTL1                      
C                   DOW       NOT %EOF(GWRQCTL1)            
C*
C*  Handle special record used to terminate the program
C                   IF        GCWFRF = *ALL'Z'              
C                   DELETE    GWRQCTL1 
C                   FEOD      GWRQCTL1 
C*
C*  Handle record which status='OS'
C                   ELSE                                    
C*  do something ...
C                   ENDIF
C*
C                   READ      GWRQCTL1  
C                   ENDDO               

Question:
=========
The RPG program resume from EOFW when I insert a new record into the
physical file which status='OS'.  But the problem is that, the
program does not resume when I change the status of an existing
record from other values to 'OS'.

In the view of the logical file, there is a new record if a message's
status is changed from other values to 'OS' in the physical file.

Any mistake in my method?  Any method to fix it?  Thank you!


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.