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



Try using just 

If not %eof;

Omit the record format... 


Thanks,
Tommy Holden


-----Original Message-----
From: rpg400-l-bounces+tommy.holden=hcahealthcare.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+tommy.holden=hcahealthcare.com@xxxxxxxxxxxx] On
Behalf Of Jerry Adams
Sent: Wednesday, October 05, 2005 12:24 PM
To: RPG Midrange
Subject: %EOF with READC

I know I'm going to kick myself as soon as I hit the Send icon because
I'll see the error just a microsecond later.

But I cannot get the %eof() built-in function to work with subfiles. The
manual says it will (pages 479 and 710), but it doesn't like me. I have
pasted what I think are the relevant pieces of code. Hopefully someone
out there has better eyesight than I.


    FIT002FM CF E WORKSTN INFDS(WSDS)
    F SFILE(IT002B:RRN1)

    EXSR #Load; // Load the subfile

    EXFMT IT002BCTL; // Subfile control.

    READC IT002B; // Find the selection, if any.
    IF not %eof(IT002B);
    aaaaaa
    a 011400 Parameter IT002B is not valid for built-in function %EOF.
    %EOF is ignored.

 From the WDS ILE RPG Reference manual (pg 710):

You can specify an indicator in positions 75-76 that will be set on when
there are no more changed records in the subfile. This information can
also be obtained from the %EOF built-in function, which returns '1' if
there are no more changed records in the subfile and '0' otherwise.

Thanks.


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.