|
I am having a problem when using a file with multiple members in that the DOWEQ loop is processing one too many times for each input record. The READE statement is not setting the EOF indicator when I think that it should. I am overriding the database file member in the CL which calls the program. /* OVERRIDE FILE MEMBER FOR COMPANY PROCESSED */ OVRDBF FILE(PYFRMWI) TOFILE(*LIBL/PYFRMWI) + MBR(&MEMBER9) OVRDBF FILE(PYFRML01) TOFILE(*LIBL/PYFRML01) + MBR(&MEMBER9) The variable &MEMBER9 contains 'PYFRM11'. This member exits in the file. The RPG III code is as follows. When debugging the program, and there is only one record in the file, I can see that the UPDAT PYFRMNCR is executed twice. The *IN98 is not set on until the third READE. I am unsure what my problem is. Is it my understanding of the READE and DOWEQ or maybe multiple members file? Also, when there were four input records the update was eight. Any suggestion is appreciated. FPYFRML01UF E K DISK KINFSR *PSSR C KYPAY KLIST ORM01 C KFLD CONO45 ORM01 C KFLD SUPN45 ORM01 C PYFRM BEGSR * C KYPAY SETLLPYFRML01 98 C *IN98 IFEQ *ON C KYPAY READEPYFRML01 98 C *IN98 DOWEQ*OFF * C MOVELCHQN45 CHKWRK 8 C MOVE CHKWRK CKNMWI C UPDATPYFRMNCR * C KYPAY READEPYFRML01 98 * C ENDDO ORM01 www.ormet.com Ormet - A Totally Integrated Aluminum Producer Karl.Brookover@Ormet.com 740-483-2901 Desk 740-483-2988 Fax
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.