|
Yes, Jerry, kick yourself. <vbg> You don't specify the record format name on %EOF, you specify the file name only. That's one of those RPGIV-sucky design features. I would simply leave off the qualifier on %EOF. -Bob Cozzi www.RPGxTools.com RPG xTools - Enjoy programming again. -----Original Message----- From: rpg400-l-bounces+cozzi=rpgiv.com@xxxxxxxxxxxx [mailto:rpg400-l-bounces+cozzi=rpgiv.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.
This mailing list archive is Copyright 1997-2026 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.