|
hrishikesh, Jim L. is correct. Either change the test to *ON or use DOWEQ. There are some other logic errors in this program. Here's a hint, make sure *IN97 is set everywhere it should be, and is Overflow going to work the way its intended? rpg400-l-request@mi drange.com To: rpg400-l@midrange.com Sent by: cc: rpg400-l-admin@midr Fax to: ange.com Subject: RPG400-L digest, Vol 1 #199 - 3 msgs 11/13/2001 01:01 PM Please respond to rpg400-l From: Jim Langston <jlangston@celsinc.com> To: "'rpg400-l@midrange.com'" <rpg400-l@midrange.com> Subject: RE: DOUEQ - Loop (RPG III) Date: Tue, 13 Nov 2001 09:43:34 -0800 Reply-To: rpg400-l@midrange.com <QUOTE> "I checked this in Debug and found that even if *IN97 & *IN96 are *OFF the loop ends?!!!" </QUOTE> Umm.. that's what you're telling it to do. 30600 C *IN97 DOUEQ*OFF 30700 C *IN96 ANDEQ*OFF Do until both *IN97 and *IN96 are off. -----Original Message----- From: hrishikesh kotwal [mailto:hdkotwal@hotmail.com] Sent: Tuesday, November 13, 2001 9:34 AM To: rpg400-l@midrange.com Subject: DOUEQ - Loop (RPG III) [ Converted text/html to text/plain ] Dear all, With reference to one of my earlier mails regarding Line Count, I had received a solution to match records and print them. In that solution DOUEQ loop was used. I have used this in my program and it has successfully printed most of the records. But today I noticed a bug in my loop. Following is the loop: 21800 **------------------------------------------------------------ 28600 C DTL020 BEGSR 29300 C SETOF 97 29400 C DDCINB CHAINCMBF4CL1 97 29500 C SETOF 96 29600 C DDCINB CHAINCMBF4D 96 30600 C *IN97 DOUEQ*OFF 30700 C *IN96 ANDEQ*OFF 30900 C *IN97 IFEQ *ON 31000 C *IN96 ANDEQ*ON 31100 C LEAVE 31200 C ENDIF 36800 C EXCPTPRTDT4 37000 C OA EXCPTPRTHDG 37200 C OA SETON OA 37800 C *IN97 IFEQ *OFF 37900 C DDCINB READECMBF4CL1 38000 C ENDIF 38200 C *IN96 IFEQ *OFF 38300 C DDCINB READECMBF4D 96 38800 C ENDIF 39000 C *IN97 IFEQ *ON 39100 C *IN96 ANDEQ*ON 39300 C EXCPTPRTDT5 39500 C ENDIF 39700 C ENDDO 39800 C* 39900 C ENDSR ------------------------------------------------------------------ I read files CMBF2CL1 & CMBF2D together for a common DDCINB (Item Number). Both files may have none or multiple records for DDCINB. I want to print whatever records exist in both files for DDCINB. Therefore I am trying to use the Match Record Processing logic BUT My problem is that when CMBF2CL1 & CMBF2D have more than one record for the same DDCINB the loop fails. I checked this in Debug and found that even if *IN97 & *IN96 are *OFF the loop ends?!!! How is this possible? Is there something wrong in this loop. Please help. Regards, Hrishikesh Kotwal
As an Amazon Associate we earn from qualifying purchases.
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.