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



Given the code example Mona shared, it doesn't appear that the problem could be 
caused by another read loop in the GetDetails SR, because the last statement 
before the ENDDO is the "PM02KY        ReadE     VENDOR3" which should reset 
the EOF condition based upon THAT read. I do agree about your better coding of 
the DoW - the explicit specification of the file for which you want the EOF 
condition checked is much clearer and accurate coding.

I agree with the consensus, though, that the error is likely in one of the 
subfields of PM02KY being changed within GetDetails.

==Kevin

-----Original Message-----
From: system21-bounces@xxxxxxxxxxxx
[mailto:system21-bounces@xxxxxxxxxxxx]On Behalf Of Geac User
Sent: Wednesday, September 08, 2004 9:09 AM
To: System 21 Users
Subject: Re: [SYSTEM21] RPG question


I am convinced that what Roshan Joseph said is true:
Either a field that belongs to the key (PM02KY), is
being reset/updated in GetDetails subroutine or there
is another read loop within GetDetails that changes
the %EOF value from FALSE to TRUE.

At the very minimum you should change your test for
EOF to the following...  By specifying the file name
you avoid the possibility of the %EOF condition being
set to TRUE in some other read loop.

        DoW       not %EOF(VENDOR3)     

It seems to me that the last time you asked a question
like this it was the call to the subroutine that
caused your problem that time too!

Good luck...             
--- mon.ferriols@xxxxxxxxxxxxxx wrote:

> Dear list:
> 
>  
> 
> I have a program here and it refuses to do what I
> want. First I read INP35
> and get all the parts masterfile stuff, then I read
> PMP01 because I want to
> get all the suppliers (if any) of that item (can be
> more than 1). What the
> program does is once it gets a match, it gets all
> the details and proceeds
> to the next part number. What I want it do is to go
> back and see if there
> are anymore suppliers for the SAME item. My code
> looks like:
> 
>  
> 
> GetSupplier   BEGSR                                
> 
>                                                    
> 
> PM02KY        Setll     VENDOR3                    
> 
>               If        %Equal                     
> 
> PM02KY        ReadE     VENDOR3                    
> 
>               DoW       not %EOF                   
> 
>                                                    
> 
>               Eval      VNDRDL = VNDR01            
> 
>               Eval      BENDOR = VNDR01            
> 
>               Eval      CURCDL = CURC01            
> 
>               Eval      LEADDL = LEAD01            
> 
>                                                    
> 
>               EXSR      GetDetails                 
> 
>                                                    
> 
> PM02KY        ReadE     VENDOR3                    
> 
>               EndDo                                
> 
>                                                    
> 
>               Else                                 
> 
> Eval      VNDRDL = 'N/A'               
> 
> Eval      BENDOR = 'N/A'               
> 
> Eval      CURCDL = 'N/A'               
> 
> Eval      LEADDL = *zero               
> 
> Eval      SNAMDL = 'No Vendor'         
> 
> Eval      INCODL = 'N/A'               
> 
> Eval      SHPMDL = 'N/A'               
> 
> Eval      COCDDL = 'N/A'               
> 
> Eval      PTTD05 = *zero               
> 
> EndIf       
> 
>  
> 
> EndSr                           
> 
>  
> 
>  
> 
> This SR is called from the main routine that reads
> INP35. How can I make it
> loop within the PMP01 read? Thanks in advanced.
> 
>  
> 
> Mona
> 
>  
> 
>  
> 
> _______________________________________________
> This is the System 21 Users (SYSTEM21) mailing list
> To post a message email: SYSTEM21@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/mailman/listinfo/system21
> or email: SYSTEM21-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/system21.
> 
> 



                
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
_______________________________________________
This is the System 21 Users (SYSTEM21) mailing list
To post a message email: SYSTEM21@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/system21
or email: SYSTEM21-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/system21.



**********************************************************************
CONFIDENTIALITY NOTICE:  The information transmitted in this message is 
intended only for the person or entity to which it is addressed and may contain 
confidential and/or privileged material.  Any review, retransmission, 
dissemination or other use of this information by persons or entities other 
than the intended recipient is prohibited.  If you received this in error, 
please contact the sender and destroy all copies of this document.  Thank you.  
The Butler Company
**********************************************************************



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.