|
On Fri, 2005-07-01 at 09:58 -0700, Mahesh Pawar wrote:
> I am using EOFDLY option in OVRDBF of PF and calling RPG program to process
> the file. Itʼs works fine whenever there is at least one records in file. But
> if my file is empty. Program doesnʼt wait for new records.
Mahesh,
EOFDLY has been working fine since system/38 days. Your override isn't
correct, or your code isn't correct.
Look at this sample code. I started the program with an empty file, and
it waited just like it was supposed to. As I added records, it woke up
and received them, just like it was supposed to.
EOFDLYP, type PF
A UNIQUE
A R EOFDLY
A SEQ# 9P 0
A K SEQ#
EOFDLYC, type CLP
PGM
OVRDBF EOFDLYP EOFDLY(60)
CALL EOFDLYR
ENDPGM
EOFDLYR, type RPGLE
Feofdlyp if e k disk
d msg s 50
/free
read eofdlyp;
dow NOT %eof(eofdlyp);
// See if the job has been canceled
if %shtdn;
leave;
endif;
msg = 'Got Record ' + %char(seq#);
dsply msg;
read eofdlyp;
enddo;
*inlr = '1';
/end-free
Regards,
Rich
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.