Delete BPM Blank Title 111140

Better, though I still in disapprove :-)

*Jose C Gomez*
*Software Engineer*
*
*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Jun 14, 2012 at 9:42 AM, Rob Bucek <rbucek@...> wrote:

> **
>
>
> That's my boy!
>
> Rob Bucek
> Production Control Manager
> D&S Manafacturing
> M: (715) 896-0590<tel:7158960590>
> P: (715) 896-0590<tel:7158960590>
>
> Sent from my Verizon Wireless Droid
>
>
> -----Original message-----
> From: Jose Gomez <jose@...>
> To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
> Sent: Thu, Jun 14, 2012 13:02:12 GMT+00:00
> Subject: Re: [Vantage] Re: Delete BPM
>
> VIC!!!!! *shakes head* LoL
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Thu, Jun 14, 2012 at 8:54 AM, Vic Drecchio
> <vic.drecchio@...>wrote:
>
> > **
> >
> >
> > Or, you could install and use Squirrel and update/delete all you want
> > (assuming you're not SQL, otherwise you can resolve it via SQL).
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf
> > Of Steven Gotschall
> > Sent: Wednesday, June 13, 2012 4:38 PM
> > To: vantage@yahoogroups.com
> > Subject: Re: [Vantage] Re: Delete BPM
> >
> >
> > You need to contact your Epicor Account Manager and request a Progress
> > license upgrade. It is free and will allow you to run updatable 4gl code
> in
> > Vantage.
> >
> > Steven G.
> >
> > ________________________________
> > From: "michael.hutcheson@... <mailto:
> > michael.hutcheson%40rocketmail.com> " <michael.hutcheson@...
> <mailto:
> > michael.hutcheson%40rocketmail.com> >
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > Sent: Wednesday, June 13, 2012 4:16 PM
> > Subject: [Vantage] Re: Delete BPM
> >
> > Ok, I tried the below:
> >
> > for each PartCost where ( PartCost.CostID = '' ) :
> > DELETE PartCost.
> > End.
> >
> > And now get the below:
> >
> > Error Detail
> > ============
> > You may not compile programs that update the database in this version
> (490)
> > ** Could not understand line 22. (196)
> >
> > Have I hit a brick wall?
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> > Steven Gotschall <sgotschall@...> wrote:
> > >
> > > You need a period at the end of DELETE PartCost.� You also need to
> > remove No-Lock from the For Each or else you wont be able to delete the
> > record.� Make sure you backup your database first.
> > > �
> > > Steven G.
> > >
> > >
> > > ________________________________
> > > From: "michael.hutcheson@..." <michael.hutcheson@...>
> > > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > > Sent: Wednesday, June 13, 2012 3:52 PM
> > > Subject: [Vantage] Re: Delete BPM
> > >
> > >
> > > �
> > > I've tried the following code:
> > >
> > > for each PartCost where ( PartCost.CostID = '') no-lock :
> > > DELETE PartCost
> > > End.
> > >
> > > But receive this error:
> > >
> > > Error Detail
> > > ============
> > > ** Unable to understand after -- "DELETE PartCost". (247)
> > > ** Could not understand line 23. (198)
> > >
> > > Any ideas?
> > >
> > > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> > "michael.hutcheson@" <michael.hutcheson@> wrote:
> > > >
> > > > So could I use a BPM, tie it to say Part.Update then just tell it to
> > execute 4GL stating the below:
> > > >
> > > > FOR EACH PartCost WHERE <CostID = " ">:
> > > > DELETE PartCost.
> > > > END.
> > > >
> > > > Would this work? Is the delete statement just DELETE PartCost?
> > > >
> > > > Thanks in advance.
> > > >
> > > >
> > > > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> > John Driggers <waffqle@> wrote:
> > > > >
> > > > > Oops, accidentally sent that too quick.
> > > > >
> > > > > If you don't have the Progress Compiler, you can do this via a BPM
> > but you
> > > > > have to disable the triggers on the table. I've not done it myself
> > in ages,
> > > > > but it will work. That said, I've heard horror stories about
> people
> > hosing
> > > > > DBs by disabling triggers and not re-enabling them properly. I'd
> > really
> > > > > advise against this. Between the added danger and complexity, you
> > might as
> > > > > well just deal with the BOs as they aren't too hard to work with
> > anyway.
> > > > >
> > > > >
> > > > > *John Driggers*
> > > > > *High End Dev, System Design, Profit Drinking*
> > > > > *
> > > > > **:: 904.404.9233*
> > > > > *:: waffqle@*
> > > > > *:: NO FAXES*
> > > > >
> > > > > *
> > > > >
> > > > > *
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> > > > >
> > > > > > Ok. You've got two options here.
> > &
>
> [Non-text portions of this message have been removed]
>
>
>


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

What is the correct code in 4GL to delete a record?

For example, I have the following code:

for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:

End.

What line of code do I need to have to delete the parts? Do I use the Run lib\UpdateTableBuffer.p?

Thanks in advance.

Michael

Vantage 8.03.406 / Progress
Delete in 4gl is pretty simple
DELETE UD01.

However there are a couple catches in your situation. First you can't
delete parts by just removing the Part record. There are other records
(PartBin, PartWhse, etc) that need to be removed as well. Also, you don't
want to accidentally delete a part that is in use.

What you need to do is call the part business object. There are multiple
threads here that explain how to do this.

Once you've got a handle on calling the BOs you just need to call
'DeleteByID' on the part using the partnum. Tada!

*John Driggers*
*High End Dev, System Design, Profit Drinking*
*
**:: 904.404.9233*
*:: waffqle@...*
*:: NO FAXES*

*

*



On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@... <
michael.hutcheson@...> wrote:

> **
>
>
> Hi guys,
>
> What is the correct code in 4GL to delete a record?
>
> For example, I have the following code:
>
> for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
>
> End.
>
> What line of code do I need to have to delete the parts? Do I use the Run
> lib\UpdateTableBuffer.p?
>
> Thanks in advance.
>
> Michael
>
> Vantage 8.03.406 / Progress
>
>
>


[Non-text portions of this message have been removed]
Ah ok. Perhaps the Part was the wrong example. We have a problem whereby the part costs were established before the CostID was connected to the plant. So in the PartCost table the parts have two costs. I need to delete all the parts in the PartCost table where the CostID is null. So how would I code this in the 4GL statement?

--- In vantage@yahoogroups.com, John Driggers <waffqle@...> wrote:
>
> Delete in 4gl is pretty simple
> DELETE UD01.
>
> However there are a couple catches in your situation. First you can't
> delete parts by just removing the Part record. There are other records
> (PartBin, PartWhse, etc) that need to be removed as well. Also, you don't
> want to accidentally delete a part that is in use.
>
> What you need to do is call the part business object. There are multiple
> threads here that explain how to do this.
>
> Once you've got a handle on calling the BOs you just need to call
> 'DeleteByID' on the part using the partnum. Tada!
>
> *John Driggers*
> *High End Dev, System Design, Profit Drinking*
> *
> **:: 904.404.9233*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
> *
>
>
>
> On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@... <
> michael.hutcheson@...> wrote:
>
> > **
> >
> >
> > Hi guys,
> >
> > What is the correct code in 4GL to delete a record?
> >
> > For example, I have the following code:
> >
> > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> >
> > End.
> >
> > What line of code do I need to have to delete the parts? Do I use the Run
> > lib\UpdateTableBuffer.p?
> >
> > Thanks in advance.
> >
> > Michael
> >
> > Vantage 8.03.406 / Progress
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
Ok. You've got two options here.

1. Use the BO's. Forgive me for not knowing the methods off the top of my
head. What you'd do is enable tracing, then delete one of the partcost
records 'normally'. Look at the trace log to see what BOs and methods were
utilized. Replicate this in your 4gl code. Fun!

2. Take a bit of a risk and just burn out the records directly. To do this
in v8, it's going to be easier to work outside the BPM. Do you have the
application compiler for progress? If so, the following program should do
the trick:

FOR EACH PartCost WHERE <your conditions>:
DELETE PartCost.
END.

If you don

*John Driggers*
*High End Dev, System Design, Profit Drinking*
*
**:: 904.404.9233*
*:: waffqle@...*
*:: NO FAXES*

*

*



On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@... <
michael.hutcheson@...> wrote:

> **
>
>
> Ah ok. Perhaps the Part was the wrong example. We have a problem whereby
> the part costs were established before the CostID was connected to the
> plant. So in the PartCost table the parts have two costs. I need to delete
> all the parts in the PartCost table where the CostID is null. So how would
> I code this in the 4GL statement?
>
>
> --- In vantage@yahoogroups.com, John Driggers <waffqle@...> wrote:
> >
> > Delete in 4gl is pretty simple
> > DELETE UD01.
> >
> > However there are a couple catches in your situation. First you can't
> > delete parts by just removing the Part record. There are other records
> > (PartBin, PartWhse, etc) that need to be removed as well. Also, you don't
> > want to accidentally delete a part that is in use.
> >
> > What you need to do is call the part business object. There are multiple
> > threads here that explain how to do this.
> >
> > Once you've got a handle on calling the BOs you just need to call
> > 'DeleteByID' on the part using the partnum. Tada!
> >
> > *John Driggers*
> > *High End Dev, System Design, Profit Drinking*
> > *
> > **:: 904.404.9233*
> > *:: waffqle@...*
> > *:: NO FAXES*
> >
> > *
> >
> > *
> >
> >
> >
> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@... <
> > michael.hutcheson@...> wrote:
> >
> > > **
>
> > >
> > >
> > > Hi guys,
> > >
> > > What is the correct code in 4GL to delete a record?
> > >
> > > For example, I have the following code:
> > >
> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> > >
> > > End.
> > >
> > > What line of code do I need to have to delete the parts? Do I use the
> Run
> > > lib\UpdateTableBuffer.p?
> > >
> > > Thanks in advance.
> > >
> > > Michael
> > >
> > > Vantage 8.03.406 / Progress
> > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>


[Non-text portions of this message have been removed]
Oops, accidentally sent that too quick.

If you don't have the Progress Compiler, you can do this via a BPM but you
have to disable the triggers on the table. I've not done it myself in ages,
but it will work. That said, I've heard horror stories about people hosing
DBs by disabling triggers and not re-enabling them properly. I'd really
advise against this. Between the added danger and complexity, you might as
well just deal with the BOs as they aren't too hard to work with anyway.


*John Driggers*
*High End Dev, System Design, Profit Drinking*
*
**:: 904.404.9233*
*:: waffqle@...*
*:: NO FAXES*

*

*



On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@...> wrote:

> Ok. You've got two options here.
>
> 1. Use the BO's. Forgive me for not knowing the methods off the top of my
> head. What you'd do is enable tracing, then delete one of the partcost
> records 'normally'. Look at the trace log to see what BOs and methods were
> utilized. Replicate this in your 4gl code. Fun!
>
> 2. Take a bit of a risk and just burn out the records directly. To do this
> in v8, it's going to be easier to work outside the BPM. Do you have the
> application compiler for progress? If so, the following program should do
> the trick:
>
> FOR EACH PartCost WHERE <your conditions>:
> DELETE PartCost.
> END.
>
> If you don
>
> *John Driggers*
> *High End Dev, System Design, Profit Drinking*
> *
> **:: 904.404.9233*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
> *
>
>
>
> On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@... <
> michael.hutcheson@...> wrote:
>
>> **
>>
>>
>> Ah ok. Perhaps the Part was the wrong example. We have a problem whereby
>> the part costs were established before the CostID was connected to the
>> plant. So in the PartCost table the parts have two costs. I need to delete
>> all the parts in the PartCost table where the CostID is null. So how would
>> I code this in the 4GL statement?
>>
>>
>> --- In vantage@yahoogroups.com, John Driggers <waffqle@...> wrote:
>> >
>> > Delete in 4gl is pretty simple
>> > DELETE UD01.
>> >
>> > However there are a couple catches in your situation. First you can't
>> > delete parts by just removing the Part record. There are other records
>> > (PartBin, PartWhse, etc) that need to be removed as well. Also, you
>> don't
>> > want to accidentally delete a part that is in use.
>> >
>> > What you need to do is call the part business object. There are multiple
>> > threads here that explain how to do this.
>> >
>> > Once you've got a handle on calling the BOs you just need to call
>> > 'DeleteByID' on the part using the partnum. Tada!
>> >
>> > *John Driggers*
>> > *High End Dev, System Design, Profit Drinking*
>> > *
>> > **:: 904.404.9233*
>> > *:: waffqle@...*
>> > *:: NO FAXES*
>> >
>> > *
>> >
>> > *
>> >
>> >
>> >
>> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@... <
>> > michael.hutcheson@...> wrote:
>> >
>> > > **
>>
>> > >
>> > >
>> > > Hi guys,
>> > >
>> > > What is the correct code in 4GL to delete a record?
>> > >
>> > > For example, I have the following code:
>> > >
>> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
>> > >
>> > > End.
>> > >
>> > > What line of code do I need to have to delete the parts? Do I use the
>> Run
>> > > lib\UpdateTableBuffer.p?
>> > >
>> > > Thanks in advance.
>> > >
>> > > Michael
>> > >
>> > > Vantage 8.03.406 / Progress
>> > >
>> > >
>> > >
>> >
>> >
>> > [Non-text portions of this message have been removed]
>> >
>>
>>
>>
>
>


[Non-text portions of this message have been removed]
So could I use a BPM, tie it to say Part.Update then just tell it to execute 4GL stating the below:

FOR EACH PartCost WHERE <CostID = " ">:
DELETE PartCost.
END.

Would this work? Is the delete statement just DELETE PartCost?

Thanks in advance.


--- In vantage@yahoogroups.com, John Driggers <waffqle@...> wrote:
>
> Oops, accidentally sent that too quick.
>
> If you don't have the Progress Compiler, you can do this via a BPM but you
> have to disable the triggers on the table. I've not done it myself in ages,
> but it will work. That said, I've heard horror stories about people hosing
> DBs by disabling triggers and not re-enabling them properly. I'd really
> advise against this. Between the added danger and complexity, you might as
> well just deal with the BOs as they aren't too hard to work with anyway.
>
>
> *John Driggers*
> *High End Dev, System Design, Profit Drinking*
> *
> **:: 904.404.9233*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
> *
>
>
>
> On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@...> wrote:
>
> > Ok. You've got two options here.
> >
> > 1. Use the BO's. Forgive me for not knowing the methods off the top of my
> > head. What you'd do is enable tracing, then delete one of the partcost
> > records 'normally'. Look at the trace log to see what BOs and methods were
> > utilized. Replicate this in your 4gl code. Fun!
> >
> > 2. Take a bit of a risk and just burn out the records directly. To do this
> > in v8, it's going to be easier to work outside the BPM. Do you have the
> > application compiler for progress? If so, the following program should do
> > the trick:
> >
> > FOR EACH PartCost WHERE <your conditions>:
> > DELETE PartCost.
> > END.
> >
> > If you don
> >
> > *John Driggers*
> > *High End Dev, System Design, Profit Drinking*
> > *
> > **:: 904.404.9233*
> > *:: waffqle@...*
> > *:: NO FAXES*
> >
> > *
> >
> > *
> >
> >
> >
> > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@... <
> > michael.hutcheson@...> wrote:
> >
> >> **
> >>
> >>
> >> Ah ok. Perhaps the Part was the wrong example. We have a problem whereby
> >> the part costs were established before the CostID was connected to the
> >> plant. So in the PartCost table the parts have two costs. I need to delete
> >> all the parts in the PartCost table where the CostID is null. So how would
> >> I code this in the 4GL statement?
> >>
> >>
> >> --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> >> >
> >> > Delete in 4gl is pretty simple
> >> > DELETE UD01.
> >> >
> >> > However there are a couple catches in your situation. First you can't
> >> > delete parts by just removing the Part record. There are other records
> >> > (PartBin, PartWhse, etc) that need to be removed as well. Also, you
> >> don't
> >> > want to accidentally delete a part that is in use.
> >> >
> >> > What you need to do is call the part business object. There are multiple
> >> > threads here that explain how to do this.
> >> >
> >> > Once you've got a handle on calling the BOs you just need to call
> >> > 'DeleteByID' on the part using the partnum. Tada!
> >> >
> >> > *John Driggers*
> >> > *High End Dev, System Design, Profit Drinking*
> >> > *
> >> > **:: 904.404.9233*
> >> > *:: waffqle@*
> >> > *:: NO FAXES*
> >> >
> >> > *
> >> >
> >> > *
> >> >
> >> >
> >> >
> >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> >> > michael.hutcheson@> wrote:
> >> >
> >> > > **
> >>
> >> > >
> >> > >
> >> > > Hi guys,
> >> > >
> >> > > What is the correct code in 4GL to delete a record?
> >> > >
> >> > > For example, I have the following code:
> >> > >
> >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> >> > >
> >> > > End.
> >> > >
> >> > > What line of code do I need to have to delete the parts? Do I use the
> >> Run
> >> > > lib\UpdateTableBuffer.p?
> >> > >
> >> > > Thanks in advance.
> >> > >
> >> > > Michael
> >> > >
> >> > > Vantage 8.03.406 / Progress
> >> > >
> >> > >
> >> > >
> >> >
> >> >
> >> > [Non-text portions of this message have been removed]
> >> >
> >>
> >>
> >>
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
I've tried the following code:

for each PartCost where ( PartCost.CostID = '') no-lock :
DELETE PartCost
End.


But receive this error:

Error Detail
============
** Unable to understand after -- "DELETE PartCost". (247)
** Could not understand line 23. (198)


Any ideas?

--- In vantage@yahoogroups.com, "michael.hutcheson@..." <michael.hutcheson@...> wrote:
>
> So could I use a BPM, tie it to say Part.Update then just tell it to execute 4GL stating the below:
>
> FOR EACH PartCost WHERE <CostID = " ">:
> DELETE PartCost.
> END.
>
> Would this work? Is the delete statement just DELETE PartCost?
>
> Thanks in advance.
>
>
> --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> >
> > Oops, accidentally sent that too quick.
> >
> > If you don't have the Progress Compiler, you can do this via a BPM but you
> > have to disable the triggers on the table. I've not done it myself in ages,
> > but it will work. That said, I've heard horror stories about people hosing
> > DBs by disabling triggers and not re-enabling them properly. I'd really
> > advise against this. Between the added danger and complexity, you might as
> > well just deal with the BOs as they aren't too hard to work with anyway.
> >
> >
> > *John Driggers*
> > *High End Dev, System Design, Profit Drinking*
> > *
> > **:: 904.404.9233*
> > *:: waffqle@*
> > *:: NO FAXES*
> >
> > *
> >
> > *
> >
> >
> >
> > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> >
> > > Ok. You've got two options here.
> > >
> > > 1. Use the BO's. Forgive me for not knowing the methods off the top of my
> > > head. What you'd do is enable tracing, then delete one of the partcost
> > > records 'normally'. Look at the trace log to see what BOs and methods were
> > > utilized. Replicate this in your 4gl code. Fun!
> > >
> > > 2. Take a bit of a risk and just burn out the records directly. To do this
> > > in v8, it's going to be easier to work outside the BPM. Do you have the
> > > application compiler for progress? If so, the following program should do
> > > the trick:
> > >
> > > FOR EACH PartCost WHERE <your conditions>:
> > > DELETE PartCost.
> > > END.
> > >
> > > If you don
> > >
> > > *John Driggers*
> > > *High End Dev, System Design, Profit Drinking*
> > > *
> > > **:: 904.404.9233*
> > > *:: waffqle@*
> > > *:: NO FAXES*
> > >
> > > *
> > >
> > > *
> > >
> > >
> > >
> > > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@ <
> > > michael.hutcheson@> wrote:
> > >
> > >> **
> > >>
> > >>
> > >> Ah ok. Perhaps the Part was the wrong example. We have a problem whereby
> > >> the part costs were established before the CostID was connected to the
> > >> plant. So in the PartCost table the parts have two costs. I need to delete
> > >> all the parts in the PartCost table where the CostID is null. So how would
> > >> I code this in the 4GL statement?
> > >>
> > >>
> > >> --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > >> >
> > >> > Delete in 4gl is pretty simple
> > >> > DELETE UD01.
> > >> >
> > >> > However there are a couple catches in your situation. First you can't
> > >> > delete parts by just removing the Part record. There are other records
> > >> > (PartBin, PartWhse, etc) that need to be removed as well. Also, you
> > >> don't
> > >> > want to accidentally delete a part that is in use.
> > >> >
> > >> > What you need to do is call the part business object. There are multiple
> > >> > threads here that explain how to do this.
> > >> >
> > >> > Once you've got a handle on calling the BOs you just need to call
> > >> > 'DeleteByID' on the part using the partnum. Tada!
> > >> >
> > >> > *John Driggers*
> > >> > *High End Dev, System Design, Profit Drinking*
> > >> > *
> > >> > **:: 904.404.9233*
> > >> > *:: waffqle@*
> > >> > *:: NO FAXES*
> > >> >
> > >> > *
> > >> >
> > >> > *
> > >> >
> > >> >
> > >> >
> > >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> > >> > michael.hutcheson@> wrote:
> > >> >
> > >> > > **
> > >>
> > >> > >
> > >> > >
> > >> > > Hi guys,
> > >> > >
> > >> > > What is the correct code in 4GL to delete a record?
> > >> > >
> > >> > > For example, I have the following code:
> > >> > >
> > >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> > >> > >
> > >> > > End.
> > >> > >
> > >> > > What line of code do I need to have to delete the parts? Do I use the
> > >> Run
> > >> > > lib\UpdateTableBuffer.p?
> > >> > >
> > >> > > Thanks in advance.
> > >> > >
> > >> > > Michael
> > >> > >
> > >> > > Vantage 8.03.406 / Progress
> > >> > >
> > >> > >
> > >> > >
> > >> >
> > >> >
> > >> > [Non-text portions of this message have been removed]
> > >> >
> > >>
> > >>
> > >>
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
add a period after PartCost. BTW that is not gonna work from a BPM, like
John said you'll ahve to disable triggers and such. Your best bet, is to
use the delete by ID Business Object Call.

*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Wed, Jun 13, 2012 at 3:52 PM, michael.hutcheson@... <
michael.hutcheson@...> wrote:

> **
>
>
> I've tried the following code:
>
> for each PartCost where ( PartCost.CostID = '') no-lock :
> DELETE PartCost
> End.
>
> But receive this error:
>
> Error Detail
> ============
> ** Unable to understand after -- "DELETE PartCost". (247)
> ** Could not understand line 23. (198)
>
> Any ideas?
>
>
> --- In vantage@yahoogroups.com, "michael.hutcheson@..."
> <michael.hutcheson@...> wrote:
> >
> > So could I use a BPM, tie it to say Part.Update then just tell it to
> execute 4GL stating the below:
> >
> > FOR EACH PartCost WHERE <CostID = " ">:
> > DELETE PartCost.
> > END.
> >
> > Would this work? Is the delete statement just DELETE PartCost?
> >
> > Thanks in advance.
> >
> >
> > --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > >
> > > Oops, accidentally sent that too quick.
> > >
> > > If you don't have the Progress Compiler, you can do this via a BPM but
> you
> > > have to disable the triggers on the table. I've not done it myself in
> ages,
> > > but it will work. That said, I've heard horror stories about people
> hosing
> > > DBs by disabling triggers and not re-enabling them properly. I'd really
> > > advise against this. Between the added danger and complexity, you
> might as
> > > well just deal with the BOs as they aren't too hard to work with
> anyway.
> > >
> > >
> > > *John Driggers*
> > > *High End Dev, System Design, Profit Drinking*
> > > *
> > > **:: 904.404.9233*
> > > *:: waffqle@*
> > > *:: NO FAXES*
> > >
> > > *
> > >
> > > *
> > >
> > >
> > >
> > > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> > >
> > > > Ok. You've got two options here.
> > > >
> > > > 1. Use the BO's. Forgive me for not knowing the methods off the top
> of my
> > > > head. What you'd do is enable tracing, then delete one of the
> partcost
> > > > records 'normally'. Look at the trace log to see what BOs and
> methods were
> > > > utilized. Replicate this in your 4gl code. Fun!
> > > >
> > > > 2. Take a bit of a risk and just burn out the records directly. To
> do this
> > > > in v8, it's going to be easier to work outside the BPM. Do you have
> the
> > > > application compiler for progress? If so, the following program
> should do
> > > > the trick:
> > > >
> > > > FOR EACH PartCost WHERE <your conditions>:
> > > > DELETE PartCost.
> > > > END.
> > > >
> > > > If you don
> > > >
> > > > *John Driggers*
> > > > *High End Dev, System Design, Profit Drinking*
> > > > *
> > > > **:: 904.404.9233*
> > > > *:: waffqle@*
> > > > *:: NO FAXES*
> > > >
> > > > *
> > > >
> > > > *
> > > >
> > > >
> > > >
> > > > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@ <
>
> > > > michael.hutcheson@> wrote:
> > > >
> > > >> **
> > > >>
> > > >>
> > > >> Ah ok. Perhaps the Part was the wrong example. We have a problem
> whereby
> > > >> the part costs were established before the CostID was connected to
> the
> > > >> plant. So in the PartCost table the parts have two costs. I need to
> delete
> > > >> all the parts in the PartCost table where the CostID is null. So
> how would
> > > >> I code this in the 4GL statement?
> > > >>
> > > >>
> > > >> --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > > >> >
> > > >> > Delete in 4gl is pretty simple
> > > >> > DELETE UD01.
> > > >> >
> > > >> > However there are a couple catches in your situation. First you
> can't
> > > >> > delete parts by just removing the Part record. There are other
> records
> > > >> > (PartBin, PartWhse, etc) that need to be removed as well. Also,
> you
> > > >> don't
> > > >> > want to accidentally delete a part that is in use.
> > > >> >
> > > >> > What you need to do is call the part business object. There are
> multiple
> > > >> > threads here that explain how to do this.
> > > >> >
> > > >> > Once you've got a handle on calling the BOs you just need to call
> > > >> > 'DeleteByID' on the part using the partnum. Tada!
> > > >> >
> > > >> > *John Driggers*
> > > >> > *High End Dev, System Design, Profit Drinking*
> > > >> > *
> > > >> > **:: 904.404.9233*
> > > >> > *:: waffqle@*
> > > >> > *:: NO FAXES*
> > > >> >
> > > >> > *
> > > >> >
> > > >> > *
> > > >> >
> > > >> >
> > > >> >
> > > >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> > > >> > michael.hutcheson@> wrote:
> > > >> >
> > > >> > > **
> > > >>
> > > >> > >
> > > >> > >
> > > >> > > Hi guys,
> > > >> > >
> > > >> > > What is the correct code in 4GL to delete a record?
> > > >> > >
> > > >> > > For example, I have the following code:
> > > >> > >
> > > >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> > > >> > >
> > > >> > > End.
> > > >> > >
> > > >> > > What line of code do I need to have to delete the parts? Do I
> use the
> > > >> Run
> > > >> > > lib\UpdateTableBuffer.p?
> > > >> > >
> > > >> > > Thanks in advance.
> > > >> > >
> > > >> > > Michael
> > > >> > >
> > > >> > > Vantage 8.03.406 / Progress
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> >
> > > >> >
> > > >> > [Non-text portions of this message have been removed]
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>
>
>


[Non-text portions of this message have been removed]
Ok this is getting abit above my knowledge. I cannot believe there isn't an easier way or conversion program I can run to remove these redundent part costs. If I was to delete all part costs, would this resolve it?

Thanks again,

Michael

--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> add a period after PartCost. BTW that is not gonna work from a BPM, like
> John said you'll ahve to disable triggers and such. Your best bet, is to
> use the delete by ID Business Object Call.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Wed, Jun 13, 2012 at 3:52 PM, michael.hutcheson@... <
> michael.hutcheson@...> wrote:
>
> > **
> >
> >
> > I've tried the following code:
> >
> > for each PartCost where ( PartCost.CostID = '') no-lock :
> > DELETE PartCost
> > End.
> >
> > But receive this error:
> >
> > Error Detail
> > ============
> > ** Unable to understand after -- "DELETE PartCost". (247)
> > ** Could not understand line 23. (198)
> >
> > Any ideas?
> >
> >
> > --- In vantage@yahoogroups.com, "michael.hutcheson@"
> > <michael.hutcheson@> wrote:
> > >
> > > So could I use a BPM, tie it to say Part.Update then just tell it to
> > execute 4GL stating the below:
> > >
> > > FOR EACH PartCost WHERE <CostID = " ">:
> > > DELETE PartCost.
> > > END.
> > >
> > > Would this work? Is the delete statement just DELETE PartCost?
> > >
> > > Thanks in advance.
> > >
> > >
> > > --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > > >
> > > > Oops, accidentally sent that too quick.
> > > >
> > > > If you don't have the Progress Compiler, you can do this via a BPM but
> > you
> > > > have to disable the triggers on the table. I've not done it myself in
> > ages,
> > > > but it will work. That said, I've heard horror stories about people
> > hosing
> > > > DBs by disabling triggers and not re-enabling them properly. I'd really
> > > > advise against this. Between the added danger and complexity, you
> > might as
> > > > well just deal with the BOs as they aren't too hard to work with
> > anyway.
> > > >
> > > >
> > > > *John Driggers*
> > > > *High End Dev, System Design, Profit Drinking*
> > > > *
> > > > **:: 904.404.9233*
> > > > *:: waffqle@*
> > > > *:: NO FAXES*
> > > >
> > > > *
> > > >
> > > > *
> > > >
> > > >
> > > >
> > > > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> > > >
> > > > > Ok. You've got two options here.
> > > > >
> > > > > 1. Use the BO's. Forgive me for not knowing the methods off the top
> > of my
> > > > > head. What you'd do is enable tracing, then delete one of the
> > partcost
> > > > > records 'normally'. Look at the trace log to see what BOs and
> > methods were
> > > > > utilized. Replicate this in your 4gl code. Fun!
> > > > >
> > > > > 2. Take a bit of a risk and just burn out the records directly. To
> > do this
> > > > > in v8, it's going to be easier to work outside the BPM. Do you have
> > the
> > > > > application compiler for progress? If so, the following program
> > should do
> > > > > the trick:
> > > > >
> > > > > FOR EACH PartCost WHERE <your conditions>:
> > > > > DELETE PartCost.
> > > > > END.
> > > > >
> > > > > If you don
> > > > >
> > > > > *John Driggers*
> > > > > *High End Dev, System Design, Profit Drinking*
> > > > > *
> > > > > **:: 904.404.9233*
> > > > > *:: waffqle@*
> > > > > *:: NO FAXES*
> > > > >
> > > > > *
> > > > >
> > > > > *
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@ <
> >
> > > > > michael.hutcheson@> wrote:
> > > > >
> > > > >> **
> > > > >>
> > > > >>
> > > > >> Ah ok. Perhaps the Part was the wrong example. We have a problem
> > whereby
> > > > >> the part costs were established before the CostID was connected to
> > the
> > > > >> plant. So in the PartCost table the parts have two costs. I need to
> > delete
> > > > >> all the parts in the PartCost table where the CostID is null. So
> > how would
> > > > >> I code this in the 4GL statement?
> > > > >>
> > > > >>
> > > > >> --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > > > >> >
> > > > >> > Delete in 4gl is pretty simple
> > > > >> > DELETE UD01.
> > > > >> >
> > > > >> > However there are a couple catches in your situation. First you
> > can't
> > > > >> > delete parts by just removing the Part record. There are other
> > records
> > > > >> > (PartBin, PartWhse, etc) that need to be removed as well. Also,
> > you
> > > > >> don't
> > > > >> > want to accidentally delete a part that is in use.
> > > > >> >
> > > > >> > What you need to do is call the part business object. There are
> > multiple
> > > > >> > threads here that explain how to do this.
> > > > >> >
> > > > >> > Once you've got a handle on calling the BOs you just need to call
> > > > >> > 'DeleteByID' on the part using the partnum. Tada!
> > > > >> >
> > > > >> > *John Driggers*
> > > > >> > *High End Dev, System Design, Profit Drinking*
> > > > >> > *
> > > > >> > **:: 904.404.9233*
> > > > >> > *:: waffqle@*
> > > > >> > *:: NO FAXES*
> > > > >> >
> > > > >> > *
> > > > >> >
> > > > >> > *
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> > > > >> > michael.hutcheson@> wrote:
> > > > >> >
> > > > >> > > **
> > > > >>
> > > > >> > >
> > > > >> > >
> > > > >> > > Hi guys,
> > > > >> > >
> > > > >> > > What is the correct code in 4GL to delete a record?
> > > > >> > >
> > > > >> > > For example, I have the following code:
> > > > >> > >
> > > > >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> > > > >> > >
> > > > >> > > End.
> > > > >> > >
> > > > >> > > What line of code do I need to have to delete the parts? Do I
> > use the
> > > > >> Run
> > > > >> > > lib\UpdateTableBuffer.p?
> > > > >> > >
> > > > >> > > Thanks in advance.
> > > > >> > >
> > > > >> > > Michael
> > > > >> > >
> > > > >> > > Vantage 8.03.406 / Progress
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> >
> > > > >> >
> > > > >> > [Non-text portions of this message have been removed]
> > > > >> >
> > > > >>
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
You need a period at the end of DELETE PartCost. You also need to remove No-Lock from the For Each or else you wont be able to delete the record. Make sure you backup your database first.
Â
Steven G.


________________________________
From: "michael.hutcheson@..." <michael.hutcheson@...>
To: vantage@yahoogroups.com
Sent: Wednesday, June 13, 2012 3:52 PM
Subject: [Vantage] Re: Delete BPM


Â
I've tried the following code:

for each PartCost where ( PartCost.CostID = '') no-lock :
DELETE PartCost
End.

But receive this error:

Error Detail
============
** Unable to understand after -- "DELETE PartCost". (247)
** Could not understand line 23. (198)

Any ideas?

--- In vantage@yahoogroups.com, "michael.hutcheson@..." <michael.hutcheson@...> wrote:
>
> So could I use a BPM, tie it to say Part.Update then just tell it to execute 4GL stating the below:
>
> FOR EACH PartCost WHERE <CostID = " ">:
> DELETE PartCost.
> END.
>
> Would this work? Is the delete statement just DELETE PartCost?
>
> Thanks in advance.
>
>
> --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> >
> > Oops, accidentally sent that too quick.
> >
> > If you don't have the Progress Compiler, you can do this via a BPM but you
> > have to disable the triggers on the table. I've not done it myself in ages,
> > but it will work. That said, I've heard horror stories about people hosing
> > DBs by disabling triggers and not re-enabling them properly. I'd really
> > advise against this. Between the added danger and complexity, you might as
> > well just deal with the BOs as they aren't too hard to work with anyway.
> >
> >
> > *John Driggers*
> > *High End Dev, System Design, Profit Drinking*
> > *
> > **:: 904.404.9233*
> > *:: waffqle@*
> > *:: NO FAXES*
> >
> > *
> >
> > *
> >
> >
> >
> > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> >
> > > Ok. You've got two options here.
> > >
> > > 1. Use the BO's. Forgive me for not knowing the methods off the top of my
> > > head. What you'd do is enable tracing, then delete one of the partcost
> > > records 'normally'. Look at the trace log to see what BOs and methods were
> > > utilized. Replicate this in your 4gl code. Fun!
> > >
> > > 2. Take a bit of a risk and just burn out the records directly. To do this
> > > in v8, it's going to be easier to work outside the BPM. Do you have the
> > > application compiler for progress? If so, the following program should do
> > > the trick:
> > >
> > > FOR EACH PartCost WHERE <your conditions>:
> > > DELETE PartCost.
> > > END.
> > >
> > > If you don
> > >
> > > *John Driggers*
> > > *High End Dev, System Design, Profit Drinking*
> > > *
> > > **:: 904.404.9233*
> > > *:: waffqle@*
> > > *:: NO FAXES*
> > >
> > > *
> > >
> > > *
> > >
> > >
> > >
> > > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@ <
> > > michael.hutcheson@> wrote:
> > >
> > >> **
> > >>
> > >>
> > >> Ah ok. Perhaps the Part was the wrong example. We have a problem whereby
> > >> the part costs were established before the CostID was connected to the
> > >> plant. So in the PartCost table the parts have two costs. I need to delete
> > >> all the parts in the PartCost table where the CostID is null. So how would
> > >> I code this in the 4GL statement?
> > >>
> > >>
> > >> --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > >> >
> > >> > Delete in 4gl is pretty simple
> > >> > DELETE UD01.
> > >> >
> > >> > However there are a couple catches in your situation. First you can't
> > >> > delete parts by just removing the Part record. There are other records
> > >> > (PartBin, PartWhse, etc) that need to be removed as well. Also, you
> > >> don't
> > >> > want to accidentally delete a part that is in use.
> > >> >
> > >> > What you need to do is call the part business object. There are multiple
> > >> > threads here that explain how to do this.
> > >> >
> > >> > Once you've got a handle on calling the BOs you just need to call
> > >> > 'DeleteByID' on the part using the partnum. Tada!
> > >> >
> > >> > *John Driggers*
> > >> > *High End Dev, System Design, Profit Drinking*
> > >> > *
> > >> > **:: 904.404.9233*
> > >> > *:: waffqle@*
> > >> > *:: NO FAXES*
> > >> >
> > >> > *
> > >> >
> > >> > *
> > >> >
> > >> >
> > >> >
> > >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> > >> > michael.hutcheson@> wrote:
> > >> >
> > >> > > **
> > >>
> > >> > >
> > >> > >
> > >> > > Hi guys,
> > >> > >
> > >> > > What is the correct code in 4GL to delete a record?
> > >> > >
> > >> > > For example, I have the following code:
> > >> > >
> > >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> > >> > >
> > >> > > End.
> > >> > >
> > >> > > What line of code do I need to have to delete the parts? Do I use the
> > >> Run
> > >> > > lib\UpdateTableBuffer.p?
> > >> > >
> > >> > > Thanks in advance.
> > >> > >
> > >> > > Michael
> > >> > >
> > >> > > Vantage 8.03.406 / Progress
> > >> > >
> > >> > >
> > >> > >
> > >> >
> > >> >
> > >> > [Non-text portions of this message have been removed]
> > >> >
> > >>
> > >>
> > >>
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>




[Non-text portions of this message have been removed]
Ok, I tried the below:

for each PartCost where ( PartCost.CostID = '' ) :
DELETE PartCost.
End.

And now get the below:

Error Detail
============
You may not compile programs that update the database in this version (490)
** Could not understand line 22. (196)

Have I hit a brick wall?



--- In vantage@yahoogroups.com, Steven Gotschall <sgotschall@...> wrote:
>
> You need a period at the end of DELETE PartCost. You also need to remove No-Lock from the For Each or else you wont be able to delete the record. Make sure you backup your database first.
> ÂÂ
> Steven G.
>
>
> ________________________________
> From: "michael.hutcheson@..." <michael.hutcheson@...>
> To: vantage@yahoogroups.com
> Sent: Wednesday, June 13, 2012 3:52 PM
> Subject: [Vantage] Re: Delete BPM
>
>
> ÂÂ
> I've tried the following code:
>
> for each PartCost where ( PartCost.CostID = '') no-lock :
> DELETE PartCost
> End.
>
> But receive this error:
>
> Error Detail
> ============
> ** Unable to understand after -- "DELETE PartCost". (247)
> ** Could not understand line 23. (198)
>
> Any ideas?
>
> --- In vantage@yahoogroups.com, "michael.hutcheson@" <michael.hutcheson@> wrote:
> >
> > So could I use a BPM, tie it to say Part.Update then just tell it to execute 4GL stating the below:
> >
> > FOR EACH PartCost WHERE <CostID = " ">:
> > DELETE PartCost.
> > END.
> >
> > Would this work? Is the delete statement just DELETE PartCost?
> >
> > Thanks in advance.
> >
> >
> > --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > >
> > > Oops, accidentally sent that too quick.
> > >
> > > If you don't have the Progress Compiler, you can do this via a BPM but you
> > > have to disable the triggers on the table. I've not done it myself in ages,
> > > but it will work. That said, I've heard horror stories about people hosing
> > > DBs by disabling triggers and not re-enabling them properly. I'd really
> > > advise against this. Between the added danger and complexity, you might as
> > > well just deal with the BOs as they aren't too hard to work with anyway.
> > >
> > >
> > > *John Driggers*
> > > *High End Dev, System Design, Profit Drinking*
> > > *
> > > **:: 904.404.9233*
> > > *:: waffqle@*
> > > *:: NO FAXES*
> > >
> > > *
> > >
> > > *
> > >
> > >
> > >
> > > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> > >
> > > > Ok. You've got two options here.
> > > >
> > > > 1. Use the BO's. Forgive me for not knowing the methods off the top of my
> > > > head. What you'd do is enable tracing, then delete one of the partcost
> > > > records 'normally'. Look at the trace log to see what BOs and methods were
> > > > utilized. Replicate this in your 4gl code. Fun!
> > > >
> > > > 2. Take a bit of a risk and just burn out the records directly. To do this
> > > > in v8, it's going to be easier to work outside the BPM. Do you have the
> > > > application compiler for progress? If so, the following program should do
> > > > the trick:
> > > >
> > > > FOR EACH PartCost WHERE <your conditions>:
> > > > DELETE PartCost.
> > > > END.
> > > >
> > > > If you don
> > > >
> > > > *John Driggers*
> > > > *High End Dev, System Design, Profit Drinking*
> > > > *
> > > > **:: 904.404.9233*
> > > > *:: waffqle@*
> > > > *:: NO FAXES*
> > > >
> > > > *
> > > >
> > > > *
> > > >
> > > >
> > > >
> > > > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@ <
> > > > michael.hutcheson@> wrote:
> > > >
> > > >> **
> > > >>
> > > >>
> > > >> Ah ok. Perhaps the Part was the wrong example. We have a problem whereby
> > > >> the part costs were established before the CostID was connected to the
> > > >> plant. So in the PartCost table the parts have two costs. I need to delete
> > > >> all the parts in the PartCost table where the CostID is null. So how would
> > > >> I code this in the 4GL statement?
> > > >>
> > > >>
> > > >> --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > > >> >
> > > >> > Delete in 4gl is pretty simple
> > > >> > DELETE UD01.
> > > >> >
> > > >> > However there are a couple catches in your situation. First you can't
> > > >> > delete parts by just removing the Part record. There are other records
> > > >> > (PartBin, PartWhse, etc) that need to be removed as well. Also, you
> > > >> don't
> > > >> > want to accidentally delete a part that is in use.
> > > >> >
> > > >> > What you need to do is call the part business object. There are multiple
> > > >> > threads here that explain how to do this.
> > > >> >
> > > >> > Once you've got a handle on calling the BOs you just need to call
> > > >> > 'DeleteByID' on the part using the partnum. Tada!
> > > >> >
> > > >> > *John Driggers*
> > > >> > *High End Dev, System Design, Profit Drinking*
> > > >> > *
> > > >> > **:: 904.404.9233*
> > > >> > *:: waffqle@*
> > > >> > *:: NO FAXES*
> > > >> >
> > > >> > *
> > > >> >
> > > >> > *
> > > >> >
> > > >> >
> > > >> >
> > > >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> > > >> > michael.hutcheson@> wrote:
> > > >> >
> > > >> > > **
> > > >>
> > > >> > >
> > > >> > >
> > > >> > > Hi guys,
> > > >> > >
> > > >> > > What is the correct code in 4GL to delete a record?
> > > >> > >
> > > >> > > For example, I have the following code:
> > > >> > >
> > > >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> > > >> > >
> > > >> > > End.
> > > >> > >
> > > >> > > What line of code do I need to have to delete the parts? Do I use the
> > > >> Run
> > > >> > > lib\UpdateTableBuffer.p?
> > > >> > >
> > > >> > > Thanks in advance.
> > > >> > >
> > > >> > > Michael
> > > >> > >
> > > >> > > Vantage 8.03.406 / Progress
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> >
> > > >> >
> > > >> > [Non-text portions of this message have been removed]
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>
>
>
>
> [Non-text portions of this message have been removed]
>
How do I delete one of the Part Costs normally though?

--- In vantage@yahoogroups.com, John Driggers <waffqle@...> wrote:
>
> Oops, accidentally sent that too quick.
>
> If you don't have the Progress Compiler, you can do this via a BPM but you
> have to disable the triggers on the table. I've not done it myself in ages,
> but it will work. That said, I've heard horror stories about people hosing
> DBs by disabling triggers and not re-enabling them properly. I'd really
> advise against this. Between the added danger and complexity, you might as
> well just deal with the BOs as they aren't too hard to work with anyway.
>
>
> *John Driggers*
> *High End Dev, System Design, Profit Drinking*
> *
> **:: 904.404.9233*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
> *
>
>
>
> On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@...> wrote:
>
> > Ok. You've got two options here.
> >
> > 1. Use the BO's. Forgive me for not knowing the methods off the top of my
> > head. What you'd do is enable tracing, then delete one of the partcost
> > records 'normally'. Look at the trace log to see what BOs and methods were
> > utilized. Replicate this in your 4gl code. Fun!
> >
> > 2. Take a bit of a risk and just burn out the records directly. To do this
> > in v8, it's going to be easier to work outside the BPM. Do you have the
> > application compiler for progress? If so, the following program should do
> > the trick:
> >
> > FOR EACH PartCost WHERE <your conditions>:
> > DELETE PartCost.
> > END.
> >
> > If you don
> >
> > *John Driggers*
> > *High End Dev, System Design, Profit Drinking*
> > *
> > **:: 904.404.9233*
> > *:: waffqle@...*
> > *:: NO FAXES*
> >
> > *
> >
> > *
> >
> >
> >
> > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@... <
> > michael.hutcheson@...> wrote:
> >
> >> **
> >>
> >>
> >> Ah ok. Perhaps the Part was the wrong example. We have a problem whereby
> >> the part costs were established before the CostID was connected to the
> >> plant. So in the PartCost table the parts have two costs. I need to delete
> >> all the parts in the PartCost table where the CostID is null. So how would
> >> I code this in the 4GL statement?
> >>
> >>
> >> --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> >> >
> >> > Delete in 4gl is pretty simple
> >> > DELETE UD01.
> >> >
> >> > However there are a couple catches in your situation. First you can't
> >> > delete parts by just removing the Part record. There are other records
> >> > (PartBin, PartWhse, etc) that need to be removed as well. Also, you
> >> don't
> >> > want to accidentally delete a part that is in use.
> >> >
> >> > What you need to do is call the part business object. There are multiple
> >> > threads here that explain how to do this.
> >> >
> >> > Once you've got a handle on calling the BOs you just need to call
> >> > 'DeleteByID' on the part using the partnum. Tada!
> >> >
> >> > *John Driggers*
> >> > *High End Dev, System Design, Profit Drinking*
> >> > *
> >> > **:: 904.404.9233*
> >> > *:: waffqle@*
> >> > *:: NO FAXES*
> >> >
> >> > *
> >> >
> >> > *
> >> >
> >> >
> >> >
> >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> >> > michael.hutcheson@> wrote:
> >> >
> >> > > **
> >>
> >> > >
> >> > >
> >> > > Hi guys,
> >> > >
> >> > > What is the correct code in 4GL to delete a record?
> >> > >
> >> > > For example, I have the following code:
> >> > >
> >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> >> > >
> >> > > End.
> >> > >
> >> > > What line of code do I need to have to delete the parts? Do I use the
> >> Run
> >> > > lib\UpdateTableBuffer.p?
> >> > >
> >> > > Thanks in advance.
> >> > >
> >> > > Michael
> >> > >
> >> > > Vantage 8.03.406 / Progress
> >> > >
> >> > >
> >> > >
> >> >
> >> >
> >> > [Non-text portions of this message have been removed]
> >> >
> >>
> >>
> >>
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
You need to contact your Epicor Account Manager and request a Progress license upgrade. It is free and will allow you to run updatable 4gl code in Vantage.
Â
Steven G.


________________________________
From: "michael.hutcheson@..." <michael.hutcheson@...>
To: vantage@yahoogroups.com
Sent: Wednesday, June 13, 2012 4:16 PM
Subject: [Vantage] Re: Delete BPM


Â
Ok, I tried the below:

for each PartCost where ( PartCost.CostID = '' ) :
DELETE PartCost.
End.

And now get the below:

Error Detail
============
You may not compile programs that update the database in this version (490)
** Could not understand line 22. (196)

Have I hit a brick wall?

--- In vantage@yahoogroups.com, Steven Gotschall <sgotschall@...> wrote:
>
> You need a period at the end of DELETE PartCost. You also need to remove No-Lock from the For Each or else you wont be able to delete the record. Make sure you backup your database first.
> ÂÂ
> Steven G.
>
>
> ________________________________
> From: "michael.hutcheson@..." <michael.hutcheson@...>
> To: vantage@yahoogroups.com
> Sent: Wednesday, June 13, 2012 3:52 PM
> Subject: [Vantage] Re: Delete BPM
>
>
> ÂÂ
> I've tried the following code:
>
> for each PartCost where ( PartCost.CostID = '') no-lock :
> DELETE PartCost
> End.
>
> But receive this error:
>
> Error Detail
> ============
> ** Unable to understand after -- "DELETE PartCost". (247)
> ** Could not understand line 23. (198)
>
> Any ideas?
>
> --- In vantage@yahoogroups.com, "michael.hutcheson@" <michael.hutcheson@> wrote:
> >
> > So could I use a BPM, tie it to say Part.Update then just tell it to execute 4GL stating the below:
> >
> > FOR EACH PartCost WHERE <CostID = " ">:
> > DELETE PartCost.
> > END.
> >
> > Would this work? Is the delete statement just DELETE PartCost?
> >
> > Thanks in advance.
> >
> >
> > --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > >
> > > Oops, accidentally sent that too quick.
> > >
> > > If you don't have the Progress Compiler, you can do this via a BPM but you
> > > have to disable the triggers on the table. I've not done it myself in ages,
> > > but it will work. That said, I've heard horror stories about people hosing
> > > DBs by disabling triggers and not re-enabling them properly. I'd really
> > > advise against this. Between the added danger and complexity, you might as
> > > well just deal with the BOs as they aren't too hard to work with anyway.
> > >
> > >
> > > *John Driggers*
> > > *High End Dev, System Design, Profit Drinking*
> > > *
> > > **:: 904.404.9233*
> > > *:: waffqle@*
> > > *:: NO FAXES*
> > >
> > > *
> > >
> > > *
> > >
> > >
> > >
> > > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> > >
> > > > Ok. You've got two options here.
> > > >
> > > > 1. Use the BO's. Forgive me for not knowing the methods off the top of my
> > > > head. What you'd do is enable tracing, then delete one of the partcost
> > > > records 'normally'. Look at the trace log to see what BOs and methods were
> > > > utilized. Replicate this in your 4gl code. Fun!
> > > >
> > > > 2. Take a bit of a risk and just burn out the records directly. To do this
> > > > in v8, it's going to be easier to work outside the BPM. Do you have the
> > > > application compiler for progress? If so, the following program should do
> > > > the trick:
> > > >
> > > > FOR EACH PartCost WHERE <your conditions>:
> > > > DELETE PartCost.
> > > > END.
> > > >
> > > > If you don
> > > >
> > > > *John Driggers*
> > > > *High End Dev, System Design, Profit Drinking*
> > > > *
> > > > **:: 904.404.9233*
> > > > *:: waffqle@*
> > > > *:: NO FAXES*
> > > >
> > > > *
> > > >
> > > > *
> > > >
> > > >
> > > >
> > > > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@ <
> > > > michael.hutcheson@> wrote:
> > > >
> > > >> **
> > > >>
> > > >>
> > > >> Ah ok. Perhaps the Part was the wrong example. We have a problem whereby
> > > >> the part costs were established before the CostID was connected to the
> > > >> plant. So in the PartCost table the parts have two costs. I need to delete
> > > >> all the parts in the PartCost table where the CostID is null. So how would
> > > >> I code this in the 4GL statement?
> > > >>
> > > >>
> > > >> --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > > >> >
> > > >> > Delete in 4gl is pretty simple
> > > >> > DELETE UD01.
> > > >> >
> > > >> > However there are a couple catches in your situation. First you can't
> > > >> > delete parts by just removing the Part record. There are other records
> > > >> > (PartBin, PartWhse, etc) that need to be removed as well. Also, you
> > > >> don't
> > > >> > want to accidentally delete a part that is in use.
> > > >> >
> > > >> > What you need to do is call the part business object. There are multiple
> > > >> > threads here that explain how to do this.
> > > >> >
> > > >> > Once you've got a handle on calling the BOs you just need to call
> > > >> > 'DeleteByID' on the part using the partnum. Tada!
> > > >> >
> > > >> > *John Driggers*
> > > >> > *High End Dev, System Design, Profit Drinking*
> > > >> > *
> > > >> > **:: 904.404.9233*
> > > >> > *:: waffqle@*
> > > >> > *:: NO FAXES*
> > > >> >
> > > >> > *
> > > >> >
> > > >> > *
> > > >> >
> > > >> >
> > > >> >
> > > >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> > > >> > michael.hutcheson@> wrote:
> > > >> >
> > > >> > > **
> > > >>
> > > >> > >
> > > >> > >
> > > >> > > Hi guys,
> > > >> > >
> > > >> > > What is the correct code in 4GL to delete a record?
> > > >> > >
> > > >> > > For example, I have the following code:
> > > >> > >
> > > >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> > > >> > >
> > > >> > > End.
> > > >> > >
> > > >> > > What line of code do I need to have to delete the parts? Do I use the
> > > >> Run
> > > >> > > lib\UpdateTableBuffer.p?
> > > >> > >
> > > >> > > Thanks in advance.
> > > >> > >
> > > >> > > Michael
> > > >> > >
> > > >> > > Vantage 8.03.406 / Progress
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> >
> > > >> >
> > > >> > [Non-text portions of this message have been removed]
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>
>
>
>
> [Non-text portions of this message have been removed]
>




[Non-text portions of this message have been removed]
Or, you could install and use Squirrel and update/delete all you want (assuming you're not SQL, otherwise you can resolve it via SQL).





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Steven Gotschall
Sent: Wednesday, June 13, 2012 4:38 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: Delete BPM





You need to contact your Epicor Account Manager and request a Progress license upgrade. It is free and will allow you to run updatable 4gl code in Vantage.

Steven G.

________________________________
From: "michael.hutcheson@... <mailto:michael.hutcheson%40rocketmail.com> " <michael.hutcheson@... <mailto:michael.hutcheson%40rocketmail.com> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Sent: Wednesday, June 13, 2012 4:16 PM
Subject: [Vantage] Re: Delete BPM


Ok, I tried the below:

for each PartCost where ( PartCost.CostID = '' ) :
DELETE PartCost.
End.

And now get the below:

Error Detail
============
You may not compile programs that update the database in this version (490)
** Could not understand line 22. (196)

Have I hit a brick wall?

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , Steven Gotschall <sgotschall@...> wrote:
>
> You need a period at the end of DELETE PartCost. You also need to remove No-Lock from the For Each or else you wont be able to delete the record. Make sure you backup your database first.
> Â
> Steven G.
>
>
> ________________________________
> From: "michael.hutcheson@..." <michael.hutcheson@...>
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Sent: Wednesday, June 13, 2012 3:52 PM
> Subject: [Vantage] Re: Delete BPM
>
>
> Â
> I've tried the following code:
>
> for each PartCost where ( PartCost.CostID = '') no-lock :
> DELETE PartCost
> End.
>
> But receive this error:
>
> Error Detail
> ============
> ** Unable to understand after -- "DELETE PartCost". (247)
> ** Could not understand line 23. (198)
>
> Any ideas?
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "michael.hutcheson@" <michael.hutcheson@> wrote:
> >
> > So could I use a BPM, tie it to say Part.Update then just tell it to execute 4GL stating the below:
> >
> > FOR EACH PartCost WHERE <CostID = " ">:
> > DELETE PartCost.
> > END.
> >
> > Would this work? Is the delete statement just DELETE PartCost?
> >
> > Thanks in advance.
> >
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , John Driggers <waffqle@> wrote:
> > >
> > > Oops, accidentally sent that too quick.
> > >
> > > If you don't have the Progress Compiler, you can do this via a BPM but you
> > > have to disable the triggers on the table. I've not done it myself in ages,
> > > but it will work. That said, I've heard horror stories about people hosing
> > > DBs by disabling triggers and not re-enabling them properly. I'd really
> > > advise against this. Between the added danger and complexity, you might as
> > > well just deal with the BOs as they aren't too hard to work with anyway.
> > >
> > >
> > > *John Driggers*
> > > *High End Dev, System Design, Profit Drinking*
> > > *
> > > **:: 904.404.9233*
> > > *:: waffqle@*
> > > *:: NO FAXES*
> > >
> > > *
> > >
> > > *
> > >
> > >
> > >
> > > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> > >
> > > > Ok. You've got two options here.
> > > >
> > > > 1. Use the BO's. Forgive me for not knowing the methods off the top of my
> > > > head. What you'd do is enable tracing, then delete one of the partcost
> > > > records 'normally'. Look at the trace log to see what BOs and methods were
> > > > utilized. Replicate this in your 4gl code. Fun!
> > > >
> > > > 2. Take a bit of a risk and just burn out the records directly. To do this
> > > > in v8, it's going to be easier to work outside the BPM. Do you have the
> > > > application compiler for progress? If so, the following program should do
> > > > the trick:
> > > >
> > > > FOR EACH PartCost WHERE <your conditions>:
> > > > DELETE PartCost.
> > > > END.
> > > >
> > > > If you don
> > > >
> > > > *John Driggers*
> > > > *High End Dev, System Design, Profit Drinking*
> > > > *
> > > > **:: 904.404.9233*
> > > > *:: waffqle@*
> > > > *:: NO FAXES*
> > > >
> > > > *
> > > >
> > > > *
> > > >
> > > >
> > > >
> > > > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@ <
> > > > michael.hutcheson@> wrote:
> > > >
> > > >> **
> > > >>
> > > >>
> > > >> Ah ok. Perhaps the Part was the wrong example. We have a problem whereby
> > > >> the part costs were established before the CostID was connected to the
> > > >> plant. So in the PartCost table the parts have two costs. I need to delete
> > > >> all the parts in the PartCost table where the CostID is null. So how would
> > > >> I code this in the 4GL statement?
> > > >>
> > > >>
> > > >> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , John Driggers <waffqle@> wrote:
> > > >> >
> > > >> > Delete in 4gl is pretty simple
> > > >> > DELETE UD01.
> > > >> >
> > > >> > However there are a couple catches in your situation. First you can't
> > > >> > delete parts by just removing the Part record. There are other records
> > > >> > (PartBin, PartWhse, etc) that need to be removed as well. Also, you
> > > >> don't
> > > >> > want to accidentally delete a part that is in use.
> > > >> >
> > > >> > What you need to do is call the part business object. There are multiple
> > > >> > threads here that explain how to do this.
> > > >> >
> > > >> > Once you've got a handle on calling the BOs you just need to call
> > > >> > 'DeleteByID' on the part using the partnum. Tada!
> > > >> >
> > > >> > *John Driggers*
> > > >> > *High End Dev, System Design, Profit Drinking*
> > > >> > *
> > > >> > **:: 904.404.9233*
> > > >> > *:: waffqle@*
> > > >> > *:: NO FAXES*
> > > >> >
> > > >> > *
> > > >> >
> > > >> > *
> > > >> >
> > > >> >
> > > >> >
> > > >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> > > >> > michael.hutcheson@> wrote:
> > > >> >
> > > >> > > **
> > > >>
> > > >> > >
> > > >> > >
> > > >> > > Hi guys,
> > > >> > >
> > > >> > > What is the correct code in 4GL to delete a record?
> > > >> > >
> > > >> > > For example, I have the following code:
> > > >> > >
> > > >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*') no-lock:
> > > >> > >
> > > >> > > End.
> > > >> > >
> > > >> > > What line of code do I need to have to delete the parts? Do I use the
> > > >> Run
> > > >> > > lib\UpdateTableBuffer.p?
> > > >> > >
> > > >> > > Thanks in advance.
> > > >> > >
> > > >> > > Michael
> > > >> > >
> > > >> > > Vantage 8.03.406 / Progress
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> >
> > > >> >
> > > >> > [Non-text portions of this message have been removed]
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>
>
>
>
> [Non-text portions of this message have been removed]
>

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



No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2180 / Virus Database: 2433/5065 - Release Date: 06/12/12




-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2180 / Virus Database: 2433/5068 - Release Date: 06/13/12


[Non-text portions of this message have been removed]
VIC!!!!! *shakes head* LoL

*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Jun 14, 2012 at 8:54 AM, Vic Drecchio
<vic.drecchio@...>wrote:

> **
>
>
> Or, you could install and use Squirrel and update/delete all you want
> (assuming you're not SQL, otherwise you can resolve it via SQL).
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Steven Gotschall
> Sent: Wednesday, June 13, 2012 4:38 PM
> To: vantage@yahoogroups.com
> Subject: Re: [Vantage] Re: Delete BPM
>
>
> You need to contact your Epicor Account Manager and request a Progress
> license upgrade. It is free and will allow you to run updatable 4gl code in
> Vantage.
>
> Steven G.
>
> ________________________________
> From: "michael.hutcheson@... <mailto:
> michael.hutcheson%40rocketmail.com> " <michael.hutcheson@...<mailto:
> michael.hutcheson%40rocketmail.com> >
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Sent: Wednesday, June 13, 2012 4:16 PM
> Subject: [Vantage] Re: Delete BPM
>
> Ok, I tried the below:
>
> for each PartCost where ( PartCost.CostID = '' ) :
> DELETE PartCost.
> End.
>
> And now get the below:
>
> Error Detail
> ============
> You may not compile programs that update the database in this version (490)
> ** Could not understand line 22. (196)
>
> Have I hit a brick wall?
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> Steven Gotschall <sgotschall@...> wrote:
> >
> > You need a period at the end of DELETE PartCost.� You also need to
> remove No-Lock from the For Each or else you wont be able to delete the
> record.� Make sure you backup your database first.
> > �
> > Steven G.
> >
> >
> > ________________________________
> > From: "michael.hutcheson@..." <michael.hutcheson@...>
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > Sent: Wednesday, June 13, 2012 3:52 PM
> > Subject: [Vantage] Re: Delete BPM
> >
> >
> > �
> > I've tried the following code:
> >
> > for each PartCost where ( PartCost.CostID = '') no-lock :
> > DELETE PartCost
> > End.
> >
> > But receive this error:
> >
> > Error Detail
> > ============
> > ** Unable to understand after -- "DELETE PartCost". (247)
> > ** Could not understand line 23. (198)
> >
> > Any ideas?
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "michael.hutcheson@" <michael.hutcheson@> wrote:
> > >
> > > So could I use a BPM, tie it to say Part.Update then just tell it to
> execute 4GL stating the below:
> > >
> > > FOR EACH PartCost WHERE <CostID = " ">:
> > > DELETE PartCost.
> > > END.
> > >
> > > Would this work? Is the delete statement just DELETE PartCost?
> > >
> > > Thanks in advance.
> > >
> > >
> > > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> John Driggers <waffqle@> wrote:
> > > >
> > > > Oops, accidentally sent that too quick.
> > > >
> > > > If you don't have the Progress Compiler, you can do this via a BPM
> but you
> > > > have to disable the triggers on the table. I've not done it myself
> in ages,
> > > > but it will work. That said, I've heard horror stories about people
> hosing
> > > > DBs by disabling triggers and not re-enabling them properly. I'd
> really
> > > > advise against this. Between the added danger and complexity, you
> might as
> > > > well just deal with the BOs as they aren't too hard to work with
> anyway.
> > > >
> > > >
> > > > *John Driggers*
> > > > *High End Dev, System Design, Profit Drinking*
> > > > *
> > > > **:: 904.404.9233*
> > > > *:: waffqle@*
> > > > *:: NO FAXES*
> > > >
> > > > *
> > > >
> > > > *
> > > >
> > > >
> > > >
> > > > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> > > >
> > > > > Ok. You've got two options here.
> > > > >
> > > > > 1. Use the BO's. Forgive me for not knowing the methods off the
> top of my
> > > > > head. What you'd do is enable tracing, then delete one of the
> partcost
> > > > > records 'normally'. Look at the trace log to see what BOs and
> methods were
> > > > > utilized. Replicate this in your 4gl code. Fun!
> > > > >
> > > > > 2. Take a bit of a risk and just burn out the records directly. To
> do this
> > > > > in v8, it's going to be easier to work outside the BPM. Do you
> have the
> > > > > application compiler for progress? If so, the following program
> should do
> > > > > the trick:
> > > > >
> > > > > FOR EACH PartCost WHERE <your conditions>:
> > > > > DELETE PartCost.
> > > > > END.
> > > > >
> > > > > If you don
> > > > >
> > > > > *John Driggers*
> > > > > *High End Dev, System Design, Profit Drinking*
> > > > > *
> > > > > **:: 904.404.9233*
> > > > > *:: waffqle@*
> > > > > *:: NO FAXES*
> > > > >
> > > > > *
> > > > >
> > > > > *
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@ <
> > > > > michael.hutcheson@> wrote:
> > > > >
> > > > >> **
> > > > >>
> > > > >>
> > > > >> Ah ok. Perhaps the Part was the wrong example. We have a problem
> whereby
> > > > >> the part costs were established before the CostID was connected
> to the
> > > > >> plant. So in the PartCost table the parts have two costs. I need
> to delete
> > > > >> all the parts in the PartCost table where the CostID is null. So
> how would
> > > > >> I code this in the 4GL statement?
> > > > >>
> > > > >>
> > > > >> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> , John Driggers <waffqle@> wrote:
> > > > >> >
> > > > >> > Delete in 4gl is pretty simple
> > > > >> > DELETE UD01.
> > > > >> >
> > > > >> > However there are a couple catches in your situation. First you
> can't
> > > > >> > delete parts by just removing the Part record. There are other
> records
> > > > >> > (PartBin, PartWhse, etc) that need to be removed as well. Also,
> you
> > > > >> don't
> > > > >> > want to accidentally delete a part that is in use.
> > > > >> >
> > > > >> > What you need to do is call the part business object. There are
> multiple
> > > > >> > threads here that explain how to do this.
> > > > >> >
> > > > >> > Once you've got a handle on calling the BOs you just need to
> call
> > > > >> > 'DeleteByID' on the part using the partnum. Tada!
> > > > >> >
> > > > >> > *John Driggers*
> > > > >> > *High End Dev, System Design, Profit Drinking*
> > > > >> > *
> > > > >> > **:: 904.404.9233*
> > > > >> > *:: waffqle@*
> > > > >> > *:: NO FAXES*
> > > > >> >
> > > > >> > *
> > > > >> >
> > > > >> > *
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> > > > >> > michael.hutcheson@> wrote:
> > > > >> >
> > > > >> > > **
> > > > >>
> > > > >> > >
> > > > >> > >
> > > > >> > > Hi guys,
> > > > >> > >
> > > > >> > > What is the correct code in 4GL to delete a record?
> > > > >> > >
> > > > >> > > For example, I have the following code:
> > > > >> > >
> > > > >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*')
> no-lock:
> > > > >> > >
> > > > >> > > End.
> > > > >> > >
> > > > >> > > What line of code do I need to have to delete the parts? Do I
> use the
> > > > >> Run
> > > > >> > > lib\UpdateTableBuffer.p?
> > > > >> > >
> > > > >> > > Thanks in advance.
> > > > >> > >
> > > > >> > > Michael
> > > > >> > >
> > > > >> > > Vantage 8.03.406 / Progress
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> >
> > > > >> >
> > > > >> > [Non-text portions of this message have been removed]
> > > > >> >
> > > > >>
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
> [Non-text portions of this message have been removed]
>
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2180 / Virus Database: 2433/5065 - Release Date: 06/12/12
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2180 / Virus Database: 2433/5068 - Release Date: 06/13/12
>
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]
Oh yes, sorry:

Disclaimer: "Extremely carefully...... in a test environment first".

:-)

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Jose Gomez
Sent: Thursday, June 14, 2012 9:01 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: Delete BPM

VIC!!!!! *shakes head* LoL

*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Jun 14, 2012 at 8:54 AM, Vic Drecchio
<vic.drecchio@...>wrote:

> **
>
>
> Or, you could install and use Squirrel and update/delete all you want
> (assuming you're not SQL, otherwise you can resolve it via SQL).
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf Of Steven Gotschall
> Sent: Wednesday, June 13, 2012 4:38 PM
> To: vantage@yahoogroups.com
> Subject: Re: [Vantage] Re: Delete BPM
>
>
> You need to contact your Epicor Account Manager and request a Progress
> license upgrade. It is free and will allow you to run updatable 4gl
> code in Vantage.
>
> Steven G.
>
> ________________________________
> From: "michael.hutcheson@... <mailto:
> michael.hutcheson%40rocketmail.com> "
<michael.hutcheson@...<mailto:
> michael.hutcheson%40rocketmail.com> >
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Sent: Wednesday, June 13, 2012 4:16 PM
> Subject: [Vantage] Re: Delete BPM
>
> Ok, I tried the below:
>
> for each PartCost where ( PartCost.CostID = '' ) :
> DELETE PartCost.
> End.
>
> And now get the below:
>
> Error Detail
> ============
> You may not compile programs that update the database in this version
> (490)
> ** Could not understand line 22. (196)
>
> Have I hit a brick wall?
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> Steven Gotschall <sgotschall@...> wrote:
> >
> > You need a period at the end of DELETE PartCost. You also need to
> remove No-Lock from the For Each or else you wont be able to delete
> the record. Make sure you backup your database first.
> > Â
> > Steven G.
> >
> >
> > ________________________________
> > From: "michael.hutcheson@..." <michael.hutcheson@...>
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > Sent: Wednesday, June 13, 2012 3:52 PM
> > Subject: [Vantage] Re: Delete BPM
> >
> >
> > Â
> > I've tried the following code:
> >
> > for each PartCost where ( PartCost.CostID = '') no-lock :
> > DELETE PartCost
> > End.
> >
> > But receive this error:
> >
> > Error Detail
> > ============
> > ** Unable to understand after -- "DELETE PartCost". (247)
> > ** Could not understand line 23. (198)
> >
> > Any ideas?
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "michael.hutcheson@" <michael.hutcheson@> wrote:
> > >
> > > So could I use a BPM, tie it to say Part.Update then just tell it
> > > to
> execute 4GL stating the below:
> > >
> > > FOR EACH PartCost WHERE <CostID = " ">:
> > > DELETE PartCost.
> > > END.
> > >
> > > Would this work? Is the delete statement just DELETE PartCost?
> > >
> > > Thanks in advance.
> > >
> > >
> > > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > > ,
> John Driggers <waffqle@> wrote:
> > > >
> > > > Oops, accidentally sent that too quick.
> > > >
> > > > If you don't have the Progress Compiler, you can do this via a
> > > > BPM
> but you
> > > > have to disable the triggers on the table. I've not done it
> > > > myself
> in ages,
> > > > but it will work. That said, I've heard horror stories about
> > > > people
> hosing
> > > > DBs by disabling triggers and not re-enabling them properly. I'd
> really
> > > > advise against this. Between the added danger and complexity,
> > > > you
> might as
> > > > well just deal with the BOs as they aren't too hard to work with
> anyway.
> > > >
> > > >
> > > > *John Driggers*
> > > > *High End Dev, System Design, Profit Drinking*
> > > > *
> > > > **:: 904.404.9233*
> > > > *:: waffqle@*
> > > > *:: NO FAXES*
> > > >
> > > > *
> > > >
> > > > *
> > > >
> > > >
> > > >
> > > > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> > > >
> > > > > Ok. You've got two options here.
> > > > >
> > > > > 1. Use the BO's. Forgive me for not knowing the methods off
> > > > > the
> top of my
> > > > > head. What you'd do is enable tracing, then delete one of the
> partcost
> > > > > records 'normally'. Look at the trace log to see what BOs and
> methods were
> > > > > utilized. Replicate this in your 4gl code. Fun!
> > > > >
> > > > > 2. Take a bit of a risk and just burn out the records
> > > > > directly. To
> do this
> > > > > in v8, it's going to be easier to work outside the BPM. Do you
> have the
> > > > > application compiler for progress? If so, the following
> > > > > program
> should do
> > > > > the trick:
> > > > >
> > > > > FOR EACH PartCost WHERE <your conditions>:
> > > > > DELETE PartCost.
> > > > > END.
> > > > >
> > > > > If you don
> > > > >
> > > > > *John Driggers*
> > > > > *High End Dev, System Design, Profit Drinking*
> > > > > *
> > > > > **:: 904.404.9233*
> > > > > *:: waffqle@*
> > > > > *:: NO FAXES*
> > > > >
> > > > > *
> > > > >
> > > > > *
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Jun 13, 2012 at 3:14 PM, michael.hutcheson@ <
> > > > > michael.hutcheson@> wrote:
> > > > >
> > > > >> **
> > > > >>
> > > > >>
> > > > >> Ah ok. Perhaps the Part was the wrong example. We have a
> > > > >> problem
> whereby
> > > > >> the part costs were established before the CostID was
> > > > >> connected
> to the
> > > > >> plant. So in the PartCost table the parts have two costs. I
> > > > >> need
> to delete
> > > > >> all the parts in the PartCost table where the CostID is null.
> > > > >> So
> how would
> > > > >> I code this in the 4GL statement?
> > > > >>
> > > > >>
> > > > >> --- In vantage@yahoogroups.com
> > > > >> <mailto:vantage%40yahoogroups.com>
> , John Driggers <waffqle@> wrote:
> > > > >> >
> > > > >> > Delete in 4gl is pretty simple DELETE UD01.
> > > > >> >
> > > > >> > However there are a couple catches in your situation. First
> > > > >> > you
> can't
> > > > >> > delete parts by just removing the Part record. There are
> > > > >> > other
> records
> > > > >> > (PartBin, PartWhse, etc) that need to be removed as well.
> > > > >> > Also,
> you
> > > > >> don't
> > > > >> > want to accidentally delete a part that is in use.
> > > > >> >
> > > > >> > What you need to do is call the part business object. There
> > > > >> > are
> multiple
> > > > >> > threads here that explain how to do this.
> > > > >> >
> > > > >> > Once you've got a handle on calling the BOs you just need
> > > > >> > to
> call
> > > > >> > 'DeleteByID' on the part using the partnum. Tada!
> > > > >> >
> > > > >> > *John Driggers*
> > > > >> > *High End Dev, System Design, Profit Drinking*
> > > > >> > *
> > > > >> > **:: 904.404.9233*
> > > > >> > *:: waffqle@*
> > > > >> > *:: NO FAXES*
> > > > >> >
> > > > >> > *
> > > > >> >
> > > > >> > *
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > On Wed, Jun 13, 2012 at 1:45 PM, michael.hutcheson@ <
> > > > >> > michael.hutcheson@> wrote:
> > > > >> >
> > > > >> > > **
> > > > >>
> > > > >> > >
> > > > >> > >
> > > > >> > > Hi guys,
> > > > >> > >
> > > > >> > > What is the correct code in 4GL to delete a record?
> > > > >> > >
> > > > >> > > For example, I have the following code:
> > > > >> > >
> > > > >> > > for each Part where (Part.PartNum MATCHES '*SPECIAL*')
> no-lock:
> > > > >> > >
> > > > >> > > End.
> > > > >> > >
> > > > >> > > What line of code do I need to have to delete the parts?
> > > > >> > > Do I
> use the
> > > > >> Run
> > > > >> > > lib\UpdateTableBuffer.p?
> > > > >> > >
> > > > >> > > Thanks in advance.
> > > > >> > >
> > > > >> > > Michael
> > > > >> > >
> > > > >> > > Vantage 8.03.406 / Progress
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> >
> > > > >> >
> > > > >> > [Non-text portions of this message have been removed]
> > > > >> >
> > > > >>
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
> [Non-text portions of this message have been removed]
>
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2180 / Virus Database: 2433/5065 - Release Date:
> 06/12/12
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2180 / Virus Database: 2433/5068 - Release Date:
> 06/13/12
>
>
> [Non-text portions of this message have been removed]
>
>
>


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



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

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links





-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2180 / Virus Database: 2433/5069 - Release Date: 06/14/12




-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2180 / Virus Database: 2433/5069 - Release Date: 06/14/12
That's my boy!

Rob Bucek
Production Control Manager
D&S Manafacturing
M: (715) 896-0590<tel:7158960590>
P: (715) 896-0590<tel:7158960590>

Sent from my Verizon Wireless Droid


-----Original message-----
From: Jose Gomez <jose@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Thu, Jun 14, 2012 13:02:12 GMT+00:00
Subject: Re: [Vantage] Re: Delete BPM

VIC!!!!! *shakes head* LoL

*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Jun 14, 2012 at 8:54 AM, Vic Drecchio
<vic.drecchio@...>wrote:

> **
>
>
> Or, you could install and use Squirrel and update/delete all you want
> (assuming you're not SQL, otherwise you can resolve it via SQL).
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Steven Gotschall
> Sent: Wednesday, June 13, 2012 4:38 PM
> To: vantage@yahoogroups.com
> Subject: Re: [Vantage] Re: Delete BPM
>
>
> You need to contact your Epicor Account Manager and request a Progress
> license upgrade. It is free and will allow you to run updatable 4gl code in
> Vantage.
>
> Steven G.
>
> ________________________________
> From: "michael.hutcheson@... <mailto:
> michael.hutcheson%40rocketmail.com> " <michael.hutcheson@...<mailto:
> michael.hutcheson%40rocketmail.com> >
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Sent: Wednesday, June 13, 2012 4:16 PM
> Subject: [Vantage] Re: Delete BPM
>
> Ok, I tried the below:
>
> for each PartCost where ( PartCost.CostID = '' ) :
> DELETE PartCost.
> End.
>
> And now get the below:
>
> Error Detail
> ============
> You may not compile programs that update the database in this version (490)
> ** Could not understand line 22. (196)
>
> Have I hit a brick wall?
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> Steven Gotschall <sgotschall@...> wrote:
> >
> > You need a period at the end of DELETE PartCost. You also need to
> remove No-Lock from the For Each or else you wont be able to delete the
> record. Make sure you backup your database first.
> > Â
> > Steven G.
> >
> >
> > ________________________________
> > From: "michael.hutcheson@..." <michael.hutcheson@...>
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > Sent: Wednesday, June 13, 2012 3:52 PM
> > Subject: [Vantage] Re: Delete BPM
> >
> >
> > Â
> > I've tried the following code:
> >
> > for each PartCost where ( PartCost.CostID = '') no-lock :
> > DELETE PartCost
> > End.
> >
> > But receive this error:
> >
> > Error Detail
> > ============
> > ** Unable to understand after -- "DELETE PartCost". (247)
> > ** Could not understand line 23. (198)
> >
> > Any ideas?
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "michael.hutcheson@" <michael.hutcheson@> wrote:
> > >
> > > So could I use a BPM, tie it to say Part.Update then just tell it to
> execute 4GL stating the below:
> > >
> > > FOR EACH PartCost WHERE <CostID = " ">:
> > > DELETE PartCost.
> > > END.
> > >
> > > Would this work? Is the delete statement just DELETE PartCost?
> > >
> > > Thanks in advance.
> > >
> > >
> > > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> John Driggers <waffqle@> wrote:
> > > >
> > > > Oops, accidentally sent that too quick.
> > > >
> > > > If you don't have the Progress Compiler, you can do this via a BPM
> but you
> > > > have to disable the triggers on the table. I've not done it myself
> in ages,
> > > > but it will work. That said, I've heard horror stories about people
> hosing
> > > > DBs by disabling triggers and not re-enabling them properly. I'd
> really
> > > > advise against this. Between the added danger and complexity, you
> might as
> > > > well just deal with the BOs as they aren't too hard to work with
> anyway.
> > > >
> > > >
> > > > *John Driggers*
> > > > *High End Dev, System Design, Profit Drinking*
> > > > *
> > > > **:: 904.404.9233*
> > > > *:: waffqle@*
> > > > *:: NO FAXES*
> > > >
> > > > *
> > > >
> > > > *
> > > >
> > > >
> > > >
> > > > On Wed, Jun 13, 2012 at 3:18 PM, John Driggers <waffqle@> wrote:
> > > >
> > > > > Ok. You've got two options here.
> &


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