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



Thanks to all who responded. It got me thinking. Turns out the problem is
the sequence of this SR in relation to the SR that writes to the outfile. I
just thought it wasn't looping, actually what it wasn't doing was writing
for every record found.

Mona
-----Original Message-----
From: system21-request@xxxxxxxxxxxx [mailto:system21-request@xxxxxxxxxxxx] 
Sent: Wednesday, September 08, 2004 9:19 PM
To: system21@xxxxxxxxxxxx
Subject: SYSTEM21 Digest, Vol 2, Issue 160

Send SYSTEM21 mailing list submissions to
        system21@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.midrange.com/mailman/listinfo/system21
or, via email, send a message with subject or body 'help' to
        system21-request@xxxxxxxxxxxx

You can reach the person managing the list at
        system21-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of SYSTEM21 digest..."


Today's Topics:

   1. RPG question (mon.ferriols@xxxxxxxxxxxxxx)
   2. RE: RPG question (Fabrice Calmelat)
   3. Re: RPG question (Derek Hunt)
   4. Re: RPG question (Roshan Joseph)
   5. Re: RPG question (Geac User)
   6. RE: RPG question (Lemon, Michael)
   7. RE: RPG question (Brunk, Kevin)


----------------------------------------------------------------------

message: 1
date: Wed, 8 Sep 2004 17:46:25 +0800 
from: mon.ferriols@xxxxxxxxxxxxxx
subject: [SYSTEM21]   RPG question

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

 

 



------------------------------

message: 2
date: Wed, 8 Sep 2004 12:05:32 +0100
from: "Fabrice Calmelat" <f.calmelat@xxxxxxxxxxxxxxxxxxxxxxx>
subject: RE: [SYSTEM21]   RPG question

Hi Mona,

What is the definition of your key PM02KY?


Fabrice.

-----Original Message-----
From: system21-bounces@xxxxxxxxxxxx [mailto:system21-bounces@xxxxxxxxxxxx]
On Behalf Of mon.ferriols@xxxxxxxxxxxxxx
Sent: 08 September 2004 09:46
To: System21 (system21@xxxxxxxxxxxx)
Subject: [SYSTEM21] RPG question

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.






------------------------------

message: 3
date: Wed, 8 Sep 2004 11:58:36 +0100
from: "Derek Hunt" <derek_hunt@xxxxxxxxxxxxx>
subject: Re: [SYSTEM21]   RPG question

Mona

your subroutine looks OK 

what fields are you using in the klist PM02KY
   I think this could be your problem


Derek Hunt



----- Original Message ----- 
  From: mon.ferriols@xxxxxxxxxxxxxx 
  To: System21 (system21@xxxxxxxxxxxx) 
  Sent: Wednesday, September 08, 2004 10:46 AM
  Subject: [SYSTEM21] RPG question


  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.




------------------------------

message: 4
date: Wed, 8 Sep 2004 21:09:53 +1000
from: "Roshan Joseph" <roshanjoseph@xxxxxxxxxxx>
subject: Re: [SYSTEM21]   RPG question

Is there any field that belongs to the key (PM02KY), being reset/updated in
GetDetails subroutine?

or... is there another read loop within GetDetails that changes %EOF value?


Roshan.

----- Original Message ----- 
From: <mon.ferriols@xxxxxxxxxxxxxx>
To: <system21@xxxxxxxxxxxx>
Sent: Wednesday, September 08, 2004 7:46 PM
Subject: [SYSTEM21] RPG question


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


------------------------------

message: 5
date: Wed, 8 Sep 2004 06:08:36 -0700 (PDT)
from: Geac User <geacuser@xxxxxxxxx>
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


------------------------------

message: 6
date: Wed, 8 Sep 2004 09:12:58 -0400 
from: "Lemon, Michael" <MLemon@xxxxxxxxxxx>
subject: RE: [SYSTEM21]   RPG question

It can't be an IO in the subroutine messing with the %EOF flag because there
is a READE of VENDOR3 right before the ENDDO which would set it back to the
correct state.

I suspect that the key is being tampered with or the cursor is being moved
in the subroutine.

-Mike

-----Original Message-----
From: Geac User [mailto:geacuser@xxxxxxxxx] 
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.


------------------------------

message: 7
date: Wed, 8 Sep 2004 09:18:03 -0400
from: "Brunk, Kevin" <KBrunk@xxxxxxxxxxxx>
subject: RE: [SYSTEM21]   RPG question

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
**********************************************************************




------------------------------

_______________________________________________
This is the System 21 Users (SYSTEM21) digest 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.



End of SYSTEM21 Digest, Vol 2, Issue 160
****************************************

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.