Multiple for each statements

for example:

for each Part where ( Part.PartNum = '111111111') no-lock , each PartCost where (Part.Company = PartCost.Company and Part.PartNum = PartCost.PartNum) no-lock :
Run lib\UpdateTableBuffer.p(input BUFFER PartCost:HANDLE,'StdMaterialCost', '200').
End.

for each Part where ( Part.PartNum = '222222222222222') no-lock , each PartCost where (Part.Company = PartCost.Company and Part.PartNum = PartCost.PartNum) no-lock :
Run lib\UpdateTableBuffer.p(input BUFFER PartCost:HANDLE,'StdMaterialCost', '50').
End.


except all in one statement?



--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> What do you mean by multiple parts and costs?
>
> You can use OR...
> Maybe I am misunderstanding, what exactly are you trying to do?
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
> On Tue, Sep 28, 2010 at 6:09 AM, michael.hutcheson@... <
> michael.hutcheson@...> wrote:
>
> >
> >
> > Hello,
> >
> > How do I write a 4GL statement that contains multiple FOR EACH statements?
> > For example:
> >
> > for each Part where ( Part.PartNum = 'XXXXXXX') no-lock , each PartCost
> > where (Part.Company =
> > PartCost.Company and Part.PartNum = PartCost.PartNum) no-lock :
> > Run lib\UpdateTableBuffer.p(input BUFFER PartCost:HANDLE,
> > 'StdMaterialCost', 'XXXXXXX').
> > End.
> >
> > But what happens when I have multiple parts and costs? How do I make this
> > into one big statement?
> >
> > Thanks
> >
> > Michael
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
Hello,

How do I write a 4GL statement that contains multiple FOR EACH statements? For example:

for each Part where ( Part.PartNum = 'XXXXXXX') no-lock , each PartCost where (Part.Company =
PartCost.Company and Part.PartNum = PartCost.PartNum) no-lock :
Run lib\UpdateTableBuffer.p(input BUFFER PartCost:HANDLE, 'StdMaterialCost', 'XXXXXXX').
End.

But what happens when I have multiple parts and costs? How do I make this into one big statement?

Thanks

Michael
What do you mean by multiple parts and costs?

You can use OR...
Maybe I am misunderstanding, what exactly are you trying to do?

Sincerely
Jose C Gomez

http://www.josecgomez.com


On Tue, Sep 28, 2010 at 6:09 AM, michael.hutcheson@... <
michael.hutcheson@...> wrote:

>
>
> Hello,
>
> How do I write a 4GL statement that contains multiple FOR EACH statements?
> For example:
>
> for each Part where ( Part.PartNum = 'XXXXXXX') no-lock , each PartCost
> where (Part.Company =
> PartCost.Company and Part.PartNum = PartCost.PartNum) no-lock :
> Run lib\UpdateTableBuffer.p(input BUFFER PartCost:HANDLE,
> 'StdMaterialCost', 'XXXXXXX').
> End.
>
> But what happens when I have multiple parts and costs? How do I make this
> into one big statement?
>
> Thanks
>
> Michael
>
>
>


[Non-text portions of this message have been removed]