Help with an alert program for BAM

Hi Mike,

That could be it. AFAIK, the SDK comes with a Progress Developers licence.

We'll see what Rob comes back with.

Thanks for trying.



Nigel.



--- In vantage@yahoogroups.com, "Mike Anstey" <manstey@...> wrote:
>
> Hmmm. I do have the SDK, but I didn't think my progress license was any
> different on the server. (I am also running unix server side)
>
>
>
> ________________________________
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Nigel Kerley
> Sent: Friday, May 29, 2009 12:32 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Help with an alert program for BAM
>
>
>
>
>
>
>
>
> Hi Mike,
>
> I'm still getting the same error.
>
> I've copied/pasted your code into both the BPM and the .p file. I get
> the "found" message in the server log, but immediately followed by "you
> may not compile..."
>
> Are you sure you don't have a different licence for Progress?
>
> Nigel.
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "Mike Anstey" <manstey@> wrote:
> >
> > OK I just tested this and it works just fine! (I used ABCCode Update)
> > with a Pre-processing Method directive.
> >
> >
> >
> > The method directive looks like this:
> >
> >
> >
> > FIND FIRST ttABCCode WHERE ttABCCode.RowMod = "U" or ttABCCode.RowMod
> =
> > "A" NO-LOCK NO-ERROR.
> >
> > message "found " ttabccode.ABCCode.
> >
> >
> >
> > IF AVAIL ttABCCode then DO:
> >
> > RUN ud\Test\testwritingUD01.p( input ttABCCode.ABCCode).
> >
> > END.
> >
> >
> >
> >
> >
> > To create the test program you can use a text editor and it does not
> > have to be compiled. Also since there are no triggers on UD01 the
> first
> > line is not required:
> >
> >
> >
> > /* disable triggers for load of UD01. */
> >
> >
> >
> > DEFINE INPUT PARAM job-shortchar01 AS CHAR NO-UNDO.
> >
> > message "starting ud01".
> >
> > FIND FIRST UD01 WHERE UD01.KEY1 = job-shortchar01 NO-LOCK NO-ERROR.
> >
> > IF NOT AVAIL UD01 THEN
> >
> > DO:
> >
> > CREATE UD01.
> >
> > ASSIGN UD01.KEY1 = job-shortchar01.
> >
> > END.
> >

>
I would like to create a new record in a UD table when a change is made
to the JobOper.ShortChar01 field. The alert program would first have to
verify the record didn't exist (UD.Key1 field = JobOper.ShortChar01) and
if it did not exist create a new record and then populate the
Character01 field with a static string value concatenated with the value
from the JobOper.ShortChar01 field. If the record does exist, do
nothing. Is this possible? Anyone have any code that does something
similar in concept I could work with? Thanks in advance!



Rob Bucek

Manufacturing Engineer

PH: 715-284-5376 ext 311

FAX: 715-284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site)





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

I don't think it's possible to do this. With the Progress licence that comes with Vantage, it's not possible to write 4GL code that alters the database.

Epicor supplied the means of amending existing records (Run lib\UpdateTableBuffer.p) but you can't add new records with this.

If you knew someone with a Progress developers licence, you could ask them to compile a 4GL file for you and then it would work.

One other thing I've recently found is a test .p file in UD\Test "RunBOThru4GL.p". This (as the name suggests) is supposed to allow a user run a Vantage BO from 4GL. If you could get it working maybe you could run the UD##.GetNewRecord directive from 4GL and then populate it.

I had a quick look at it, got it to connect with the database, but I haven't gotten any further. Anyone else ever looked at this?


Nigel.


--- In vantage@yahoogroups.com, "Rob Bucek" <rbucek@...> wrote:
>
> I would like to create a new record in a UD table when a change is made
> to the JobOper.ShortChar01 field. The alert program would first have to
> verify the record didn't exist (UD.Key1 field = JobOper.ShortChar01) and
> if it did not exist create a new record and then populate the
> Character01 field with a static string value concatenated with the value
> from the JobOper.ShortChar01 field. If the record does exist, do
> nothing. Is this possible? Anyone have any code that does something
> similar in concept I could work with? Thanks in advance!
>
>
>
> Rob Bucek
>
> Manufacturing Engineer
>
> PH: 715-284-5376 ext 311
>
> FAX: 715-284-4084
>
> <http://www.dsmfg.com/>
>
> (Click the logo to view our site)
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
I believe you can do it with a BPM (for an action pick "execute 4GL
code") you probably won't have a method call on JobOper.ShortChar01, but
you could probably use the Update method for JobEntry and you should be
fine.



Something like this should work:



FIND FIRST ttJobOper WHERE ttJobOper.rowmod = 'A' OR ttJobOper.rowmod =
'U' NO-LOCK NO-ERROR.

IF AVAIL ttJobOper THEN

DO:

FIND FIRST UDxx. WHERE UDxx.Key1 = ttJobOper.ShortChar01 NO-ERROR.

IF NOT AVAIL UDxx THEN

DO:

CREATE UDxx.

ASSIGN UDxx.Key1 = ttJobOper.ShortChar01.

And so on......

END.

END.

If you want to debug to see if it is working just as a statement like
this:

Message "got this far". (don't forget the "." Or it won't work)



Your message will show up in the server log file for whatever database
you are running against e.g. mfgsys803.server.log



Hope this helps.

________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Nigel Kerley
Sent: Friday, May 29, 2009 10:50 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Help with an alert program for BAM








Hi Rob,

I don't think it's possible to do this. With the Progress licence that
comes with Vantage, it's not possible to write 4GL code that alters the
database.

Epicor supplied the means of amending existing records (Run
lib\UpdateTableBuffer.p) but you can't add new records with this.

If you knew someone with a Progress developers licence, you could ask
them to compile a 4GL file for you and then it would work.

One other thing I've recently found is a test .p file in UD\Test
"RunBOThru4GL.p". This (as the name suggests) is supposed to allow a
user run a Vantage BO from 4GL. If you could get it working maybe you
could run the UD##.GetNewRecord directive from 4GL and then populate it.

I had a quick look at it, got it to connect with the database, but I
haven't gotten any further. Anyone else ever looked at this?

Nigel.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Rob
Bucek" <rbucek@...> wrote:
>
> I would like to create a new record in a UD table when a change is
made
> to the JobOper.ShortChar01 field. The alert program would first have
to
> verify the record didn't exist (UD.Key1 field = JobOper.ShortChar01)
and
> if it did not exist create a new record and then populate the
> Character01 field with a static string value concatenated with the
value
> from the JobOper.ShortChar01 field. If the record does exist, do
> nothing. Is this possible? Anyone have any code that does something
> similar in concept I could work with? Thanks in advance!
>
>
>
> Rob Bucek
>
> Manufacturing Engineer
>
> PH: 715-284-5376 ext 311
>
> FAX: 715-284-4084
>
> <http://www.dsmfg.com/ <http://www.dsmfg.com/> >
>
> (Click the logo to view our site)
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
Sorry, Mike, but I don't think so.

I tried (more-or-less) exactly the same code as you have in the alert program and I got the following error in the DB log: "You may not compile programs that update the database in this version (490)".

I get the same error displayed on-screen when I use that code in a BPM and click "Validate".


Nigel.

--- In vantage@yahoogroups.com, "Mike Anstey" <manstey@...> wrote:
>
> I believe you can do it with a BPM (for an action pick "execute 4GL
> code") you probably won't have a method call on JobOper.ShortChar01, but
> you could probably use the Update method for JobEntry and you should be
> fine.
>
>
>
> Something like this should work:
>
>
>
> FIND FIRST ttJobOper WHERE ttJobOper.rowmod = 'A' OR ttJobOper.rowmod =
> 'U' NO-LOCK NO-ERROR.
>
> IF AVAIL ttJobOper THEN
>
> DO:
>
> FIND FIRST UDxx. WHERE UDxx.Key1 = ttJobOper.ShortChar01 NO-ERROR.
>
> IF NOT AVAIL UDxx THEN
>
> DO:
>
> CREATE UDxx.
>
> ASSIGN UDxx.Key1 = ttJobOper.ShortChar01.
>
> And so on......
>
> END.
>
> END.
>
> If you want to debug to see if it is working just as a statement like
> this:
>
> Message "got this far". (don't forget the "." Or it won't work)
>
>
>
> Your message will show up in the server log file for whatever database
> you are running against e.g. mfgsys803.server.log
>
>
>
> Hope this helps.
>
> ________________________________
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Nigel Kerley
> Sent: Friday, May 29, 2009 10:50 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Help with an alert program for BAM
>
>
>
>
>
>
>
>
> Hi Rob,
>
> I don't think it's possible to do this. With the Progress licence that
> comes with Vantage, it's not possible to write 4GL code that alters the
> database.
>
> Epicor supplied the means of amending existing records (Run
> lib\UpdateTableBuffer.p) but you can't add new records with this.
>
> If you knew someone with a Progress developers licence, you could ask
> them to compile a 4GL file for you and then it would work.
>
> One other thing I've recently found is a test .p file in UD\Test
> "RunBOThru4GL.p". This (as the name suggests) is supposed to allow a
> user run a Vantage BO from 4GL. If you could get it working maybe you
> could run the UD##.GetNewRecord directive from 4GL and then populate it.
>
> I had a quick look at it, got it to connect with the database, but I
> haven't gotten any further. Anyone else ever looked at this?
>
> Nigel.
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Rob
> Bucek" <rbucek@> wrote:
> >
> > I would like to create a new record in a UD table when a change is
> made
> > to the JobOper.ShortChar01 field. The alert program would first have
> to
> > verify the record didn't exist (UD.Key1 field = JobOper.ShortChar01)
> and
> > if it did not exist create a new record and then populate the
> > Character01 field with a static string value concatenated with the
> value
> > from the JobOper.ShortChar01 field. If the record does exist, do
> > nothing. Is this possible? Anyone have any code that does something
> > similar in concept I could work with? Thanks in advance!
> >
> >
> >
> > Rob Bucek
> >
> > Manufacturing Engineer
> >
> > PH: 715-284-5376 ext 311
> >
> > FAX: 715-284-4084
> >
> > <http://www.dsmfg.com/ <http://www.dsmfg.com/> >
> >
> > (Click the logo to view our site)
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Thanks for the response Nigel, my gut feel was that this might be a
little bit of a stretch, I already have several BPM's utilizing the (Run
lib) but wasn't sure so I thought Id throw it out there.



Rob Bucek

Manufacturing Engineer

PH: 715-284-5376 ext 311

FAX: 715-284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site)



________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Nigel Kerley
Sent: Friday, May 29, 2009 8:50 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Help with an alert program for BAM





Hi Rob,

I don't think it's possible to do this. With the Progress licence that
comes with Vantage, it's not possible to write 4GL code that alters the
database.

Epicor supplied the means of amending existing records (Run
lib\UpdateTableBuffer.p) but you can't add new records with this.

If you knew someone with a Progress developers licence, you could ask
them to compile a 4GL file for you and then it would work.

One other thing I've recently found is a test .p file in UD\Test
"RunBOThru4GL.p". This (as the name suggests) is supposed to allow a
user run a Vantage BO from 4GL. If you could get it working maybe you
could run the UD##.GetNewRecord directive from 4GL and then populate it.

I had a quick look at it, got it to connect with the database, but I
haven't gotten any further. Anyone else ever looked at this?

Nigel.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Rob
Bucek" <rbucek@...> wrote:
>
> I would like to create a new record in a UD table when a change is
made
> to the JobOper.ShortChar01 field. The alert program would first have
to
> verify the record didn't exist (UD.Key1 field = JobOper.ShortChar01)
and
> if it did not exist create a new record and then populate the
> Character01 field with a static string value concatenated with the
value
> from the JobOper.ShortChar01 field. If the record does exist, do
> nothing. Is this possible? Anyone have any code that does something
> similar in concept I could work with? Thanks in advance!
>
>
>
> Rob Bucek
>
> Manufacturing Engineer
>
> PH: 715-284-5376 ext 311
>
> FAX: 715-284-4084
>
> <http://www.dsmfg.com/ <http://www.dsmfg.com/> >
>
> (Click the logo to view our site)
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
Thanks guys! Guess its SC workflow time...



Rob Bucek

Manufacturing Engineer

PH: 715-284-5376 ext 311

FAX: 715-284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site)



________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Nigel Kerley
Sent: Friday, May 29, 2009 9:30 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Help with an alert program for BAM






Sorry, Mike, but I don't think so.

I tried (more-or-less) exactly the same code as you have in the alert
program and I got the following error in the DB log: "You may not
compile programs that update the database in this version (490)".

I get the same error displayed on-screen when I use that code in a BPM
and click "Validate".

Nigel.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"Mike Anstey" <manstey@...> wrote:
>
> I believe you can do it with a BPM (for an action pick "execute 4GL
> code") you probably won't have a method call on JobOper.ShortChar01,
but
> you could probably use the Update method for JobEntry and you should
be
> fine.
>
>
>
> Something like this should work:
>
>
>
> FIND FIRST ttJobOper WHERE ttJobOper.rowmod = 'A' OR ttJobOper.rowmod
=
> 'U' NO-LOCK NO-ERROR.
>
> IF AVAIL ttJobOper THEN
>
> DO:
>
> FIND FIRST UDxx. WHERE UDxx.Key1 = ttJobOper.ShortChar01 NO-ERROR.
>
> IF NOT AVAIL UDxx THEN
>
> DO:
>
> CREATE UDxx.
>
> ASSIGN UDxx.Key1 = ttJobOper.ShortChar01.
>
> And so on......
>
> END.
>
> END.
>
> If you want to debug to see if it is working just as a statement like
> this:
>
> Message "got this far". (don't forget the "." Or it won't work)
>
>
>
> Your message will show up in the server log file for whatever database
> you are running against e.g. mfgsys803.server.log
>
>
>
> Hope this helps.
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
> Of Nigel Kerley
> Sent: Friday, May 29, 2009 10:50 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Re: Help with an alert program for BAM
>
>
>
>
>
>
>
>
> Hi Rob,
>
> I don't think it's possible to do this. With the Progress licence that
> comes with Vantage, it's not possible to write 4GL code that alters
the
> database.
>
> Epicor supplied the means of amending existing records (Run
> lib\UpdateTableBuffer.p) but you can't add new records with this.
>
> If you knew someone with a Progress developers licence, you could ask
> them to compile a 4GL file for you and then it would work.
>
> One other thing I've recently found is a test .p file in UD\Test
> "RunBOThru4GL.p". This (as the name suggests) is supposed to allow a
> user run a Vantage BO from 4GL. If you could get it working maybe you
> could run the UD##.GetNewRecord directive from 4GL and then populate
it.
>
> I had a quick look at it, got it to connect with the database, but I
> haven't gotten any further. Anyone else ever looked at this?
>
> Nigel.
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> , "Rob
> Bucek" <rbucek@> wrote:
> >
> > I would like to create a new record in a UD table when a change is
> made
> > to the JobOper.ShortChar01 field. The alert program would first have
> to
> > verify the record didn't exist (UD.Key1 field = JobOper.ShortChar01)
> and
> > if it did not exist create a new record and then populate the
> > Character01 field with a static string value concatenated with the
> value
> > from the JobOper.ShortChar01 field. If the record does exist, do
> > nothing. Is this possible? Anyone have any code that does something
> > similar in concept I could work with? Thanks in advance!
> >
> >
> >
> > Rob Bucek
> >
> > Manufacturing Engineer
> >
> > PH: 715-284-5376 ext 311
> >
> > FAX: 715-284-4084
> >
> > <http://www.dsmfg.com/ <http://www.dsmfg.com/> <
http://www.dsmfg.com/ <http://www.dsmfg.com/> > >
> >
> > (Click the logo to view our site)
> >
> >
> >
> >
> >
> > [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 just tested this and it works just fine! (I used ABCCode Update)
with a Pre-processing Method directive.



The method directive looks like this:



FIND FIRST ttABCCode WHERE ttABCCode.RowMod = "U" or ttABCCode.RowMod =
"A" NO-LOCK NO-ERROR.

message "found " ttabccode.ABCCode.



IF AVAIL ttABCCode then DO:

RUN ud\Test\testwritingUD01.p( input ttABCCode.ABCCode).

END.





To create the test program you can use a text editor and it does not
have to be compiled. Also since there are no triggers on UD01 the first
line is not required:



/* disable triggers for load of UD01. */



DEFINE INPUT PARAM job-shortchar01 AS CHAR NO-UNDO.

message "starting ud01".

FIND FIRST UD01 WHERE UD01.KEY1 = job-shortchar01 NO-LOCK NO-ERROR.

IF NOT AVAIL UD01 THEN

DO:

CREATE UD01.

ASSIGN UD01.KEY1 = job-shortchar01.

END.

________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Nigel Kerley
Sent: Friday, May 29, 2009 11:30 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Help with an alert program for BAM









Sorry, Mike, but I don't think so.

I tried (more-or-less) exactly the same code as you have in the alert
program and I got the following error in the DB log: "You may not
compile programs that update the database in this version (490)".

I get the same error displayed on-screen when I use that code in a BPM
and click "Validate".

Nigel.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"Mike Anstey" <manstey@...> wrote:
>
> I believe you can do it with a BPM (for an action pick "execute 4GL
> code") you probably won't have a method call on JobOper.ShortChar01,
but
> you could probably use the Update method for JobEntry and you should
be
> fine.
>
>
>
> Something like this should work:
>
>
>
> FIND FIRST ttJobOper WHERE ttJobOper.rowmod = 'A' OR ttJobOper.rowmod
=
> 'U' NO-LOCK NO-ERROR.
>
> IF AVAIL ttJobOper THEN
>
> DO:
>
> FIND FIRST UDxx. WHERE UDxx.Key1 = ttJobOper.ShortChar01 NO-ERROR.
>
> IF NOT AVAIL UDxx THEN
>
> DO:
>
> CREATE UDxx.
>
> ASSIGN UDxx.Key1 = ttJobOper.ShortChar01.
>
> And so on......
>
> END.
>
> END.
>
> If you want to debug to see if it is working just as a statement like
> this:
>
> Message "got this far". (don't forget the "." Or it won't work)
>
>
>
> Your message will show up in the server log file for whatever database
> you are running against e.g. mfgsys803.server.log
>
>
>
> Hope this helps.
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
> Of Nigel Kerley
> Sent: Friday, May 29, 2009 10:50 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Re: Help with an alert program for BAM
>
>
>
>
>
>
>
>
> Hi Rob,
>
> I don't think it's possible to do this. With the Progress licence that
> comes with Vantage, it's not possible to write 4GL code that alters
the
> database.
>
> Epicor supplied the means of amending existing records (Run
> lib\UpdateTableBuffer.p) but you can't add new records with this.
>
> If you knew someone with a Progress developers licence, you could ask
> them to compile a 4GL file for you and then it would work.
>
> One other thing I've recently found is a test .p file in UD\Test
> "RunBOThru4GL.p". This (as the name suggests) is supposed to allow a
> user run a Vantage BO from 4GL. If you could get it working maybe you
> could run the UD##.GetNewRecord directive from 4GL and then populate
it.
>
> I had a quick look at it, got it to connect with the database, but I
> haven't gotten any further. Anyone else ever looked at this?
>
> Nigel.
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> , "Rob
> Bucek" <rbucek@> wrote:
> >
> > I would like to create a new record in a UD table when a change is
> made
> > to the JobOper.ShortChar01 field. The alert program would first have
> to
> > verify the record didn't exist (UD.Key1 field = JobOper.ShortChar01)
> and
> > if it did not exist create a new record and then populate the
> > Character01 field with a static string value concatenated with the
> value
> > from the JobOper.ShortChar01 field. If the record does exist, do
> > nothing. Is this possible? Anyone have any code that does something
> > similar in concept I could work with? Thanks in advance!
> >
> >
> >
> > Rob Bucek
> >
> > Manufacturing Engineer
> >
> > PH: 715-284-5376 ext 311
> >
> > FAX: 715-284-4084
> >
> > <http://www.dsmfg.com/ <http://www.dsmfg.com/>
<http://www.dsmfg.com/ <http://www.dsmfg.com/> > >
> >
> > (Click the logo to view our site)
> >
> >
> >
> >
> >
> > [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]
Hi Mike,

I'm still getting the same error.

I've copied/pasted your code into both the BPM and the .p file. I get the "found" message in the server log, but immediately followed by "you may not compile..."

Are you sure you don't have a different licence for Progress?

Nigel.


--- In vantage@yahoogroups.com, "Mike Anstey" <manstey@...> wrote:
>
> OK I just tested this and it works just fine! (I used ABCCode Update)
> with a Pre-processing Method directive.
>
>
>
> The method directive looks like this:
>
>
>
> FIND FIRST ttABCCode WHERE ttABCCode.RowMod = "U" or ttABCCode.RowMod =
> "A" NO-LOCK NO-ERROR.
>
> message "found " ttabccode.ABCCode.
>
>
>
> IF AVAIL ttABCCode then DO:
>
> RUN ud\Test\testwritingUD01.p( input ttABCCode.ABCCode).
>
> END.
>
>
>
>
>
> To create the test program you can use a text editor and it does not
> have to be compiled. Also since there are no triggers on UD01 the first
> line is not required:
>
>
>
> /* disable triggers for load of UD01. */
>
>
>
> DEFINE INPUT PARAM job-shortchar01 AS CHAR NO-UNDO.
>
> message "starting ud01".
>
> FIND FIRST UD01 WHERE UD01.KEY1 = job-shortchar01 NO-LOCK NO-ERROR.
>
> IF NOT AVAIL UD01 THEN
>
> DO:
>
> CREATE UD01.
>
> ASSIGN UD01.KEY1 = job-shortchar01.
>
> END.
>
> ________________________________
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Nigel Kerley
> Sent: Friday, May 29, 2009 11:30 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Help with an alert program for BAM
>
>
>
>
>
>
>
>
>
> Sorry, Mike, but I don't think so.
>
> I tried (more-or-less) exactly the same code as you have in the alert
> program and I got the following error in the DB log: "You may not
> compile programs that update the database in this version (490)".
>
> I get the same error displayed on-screen when I use that code in a BPM
> and click "Validate".
>
> Nigel.
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "Mike Anstey" <manstey@> wrote:
> >
> > I believe you can do it with a BPM (for an action pick "execute 4GL
> > code") you probably won't have a method call on JobOper.ShortChar01,
> but
> > you could probably use the Update method for JobEntry and you should
> be
> > fine.
> >
> >
> >
> > Something like this should work:
> >
> >
> >
> > FIND FIRST ttJobOper WHERE ttJobOper.rowmod = 'A' OR ttJobOper.rowmod
> =
> > 'U' NO-LOCK NO-ERROR.
> >
> > IF AVAIL ttJobOper THEN
> >
> > DO:
> >
> > FIND FIRST UDxx. WHERE UDxx.Key1 = ttJobOper.ShortChar01 NO-ERROR.
> >
> > IF NOT AVAIL UDxx THEN
> >
> > DO:
> >
> > CREATE UDxx.
> >
> > ASSIGN UDxx.Key1 = ttJobOper.ShortChar01.
> >
> > And so on......
> >
> > END.
> >
> > END.
> >
> > If you want to debug to see if it is working just as a statement like
> > this:
> >
> > Message "got this far". (don't forget the "." Or it won't work)
> >
> >
> >
> > Your message will show up in the server log file for whatever database
> > you are running against e.g. mfgsys803.server.log
> >
> >
> >
> > Hope this helps.
> >
> > ________________________________
> >
> > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
> Behalf
> > Of Nigel Kerley
> > Sent: Friday, May 29, 2009 10:50 AM
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > Subject: [Vantage] Re: Help with an alert program for BAM
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi Rob,
> >
> > I don't think it's possible to do this. With the Progress licence that
> > comes with Vantage, it's not possible to write 4GL code that alters
> the
> > database.
> >
> > Epicor supplied the means of amending existing records (Run
> > lib\UpdateTableBuffer.p) but you can't add new records with this.
> >
> > If you knew someone with a Progress developers licence, you could ask
> > them to compile a 4GL file for you and then it would work.
> >
> > One other thing I've recently found is a test .p file in UD\Test
> > "RunBOThru4GL.p". This (as the name suggests) is supposed to allow a
> > user run a Vantage BO from 4GL. If you could get it working maybe you
> > could run the UD##.GetNewRecord directive from 4GL and then populate
> it.
> >
> > I had a quick look at it, got it to connect with the database, but I
> > haven't gotten any further. Anyone else ever looked at this?
> >
> > Nigel.
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com> , "Rob
> > Bucek" <rbucek@> wrote:
> > >
> > > I would like to create a new record in a UD table when a change is
> > made
> > > to the JobOper.ShortChar01 field. The alert program would first have
> > to
> > > verify the record didn't exist (UD.Key1 field = JobOper.ShortChar01)
> > and
> > > if it did not exist create a new record and then populate the
> > > Character01 field with a static string value concatenated with the
> > value
> > > from the JobOper.ShortChar01 field. If the record does exist, do
> > > nothing. Is this possible? Anyone have any code that does something
> > > similar in concept I could work with? Thanks in advance!
> > >
> > >
> > >
> > > Rob Bucek
> > >
> > > Manufacturing Engineer
> > >
> > > PH: 715-284-5376 ext 311
> > >
> > > FAX: 715-284-4084
> > >
> > > <http://www.dsmfg.com/ <http://www.dsmfg.com/>
> <http://www.dsmfg.com/ <http://www.dsmfg.com/> > >
> > >
> > > (Click the logo to view our site)
> > >
> > >
> > >
> > >
> > >
> > > [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]
>
Very cool Mike, I will try this out and let you know next week how it
turned out. Thank you very much.



Rob Bucek

Manufacturing Engineer

PH: 715-284-5376 ext 311

FAX: 715-284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site)



________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Mike Anstey
Sent: Friday, May 29, 2009 10:00 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: Help with an alert program for BAM





OK I just tested this and it works just fine! (I used ABCCode Update)
with a Pre-processing Method directive.

The method directive looks like this:

FIND FIRST ttABCCode WHERE ttABCCode.RowMod = "U" or ttABCCode.RowMod =
"A" NO-LOCK NO-ERROR.

message "found " ttabccode.ABCCode.

IF AVAIL ttABCCode then DO:

RUN ud\Test\testwritingUD01.p( input ttABCCode.ABCCode).

END.

To create the test program you can use a text editor and it does not
have to be compiled. Also since there are no triggers on UD01 the first
line is not required:

/* disable triggers for load of UD01. */

DEFINE INPUT PARAM job-shortchar01 AS CHAR NO-UNDO.

message "starting ud01".

FIND FIRST UD01 WHERE UD01.KEY1 = job-shortchar01 NO-LOCK NO-ERROR.

IF NOT AVAIL UD01 THEN

DO:

CREATE UD01.

ASSIGN UD01.KEY1 = job-shortchar01.

END.

________________________________

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Nigel Kerley
Sent: Friday, May 29, 2009 11:30 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: Help with an alert program for BAM

Sorry, Mike, but I don't think so.

I tried (more-or-less) exactly the same code as you have in the alert
program and I got the following error in the DB log: "You may not
compile programs that update the database in this version (490)".

I get the same error displayed on-screen when I use that code in a BPM
and click "Validate".

Nigel.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ,
"Mike Anstey" <manstey@...> wrote:
>
> I believe you can do it with a BPM (for an action pick "execute 4GL
> code") you probably won't have a method call on JobOper.ShortChar01,
but
> you could probably use the Update method for JobEntry and you should
be
> fine.
>
>
>
> Something like this should work:
>
>
>
> FIND FIRST ttJobOper WHERE ttJobOper.rowmod = 'A' OR ttJobOper.rowmod
=
> 'U' NO-LOCK NO-ERROR.
>
> IF AVAIL ttJobOper THEN
>
> DO:
>
> FIND FIRST UDxx. WHERE UDxx.Key1 = ttJobOper.ShortChar01 NO-ERROR.
>
> IF NOT AVAIL UDxx THEN
>
> DO:
>
> CREATE UDxx.
>
> ASSIGN UDxx.Key1 = ttJobOper.ShortChar01.
>
> And so on......
>
> END.
>
> END.
>
> If you want to debug to see if it is working just as a statement like
> this:
>
> Message "got this far". (don't forget the "." Or it won't work)
>
>
>
> Your message will show up in the server log file for whatever database
> you are running against e.g. mfgsys803.server.log
>
>
>
> Hope this helps.
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
> Of Nigel Kerley
> Sent: Friday, May 29, 2009 10:50 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Re: Help with an alert program for BAM
>
>
>
>
>
>
>
>
> Hi Rob,
>
> I don't think it's possible to do this. With the Progress licence that
> comes with Vantage, it's not possible to write 4GL code that alters
the
> database.
>
> Epicor supplied the means of amending existing records (Run
> lib\UpdateTableBuffer.p) but you can't add new records with this.
>
> If you knew someone with a Progress developers licence, you could ask
> them to compile a 4GL file for you and then it would work.
>
> One other thing I've recently found is a test .p file in UD\Test
> "RunBOThru4GL.p". This (as the name suggests) is supposed to allow a
> user run a Vantage BO from 4GL. If you could get it working maybe you
> could run the UD##.GetNewRecord directive from 4GL and then populate
it.
>
> I had a quick look at it, got it to connect with the database, but I
> haven't gotten any further. Anyone else ever looked at this?
>
> Nigel.
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> , "Rob
> Bucek" <rbucek@> wrote:
> >
> > I would like to create a new record in a UD table when a change is
> made
> > to the JobOper.ShortChar01 field. The alert program would first have
> to
> > verify the record didn't exist (UD.Key1 field = JobOper.ShortChar01)
> and
> > if it did not exist create a new record and then populate the
> > Character01 field with a static string value concatenated with the
> value
> > from the JobOper.ShortChar01 field. If the record does exist, do
> > nothing. Is this possible? Anyone have any code that does something
> > similar in concept I could work with? Thanks in advance!
> >
> >
> >
> > Rob Bucek
> >
> > Manufacturing Engineer
> >
> > PH: 715-284-5376 ext 311
> >
> > FAX: 715-284-4084
> >
> > <http://www.dsmfg.com/ <http://www.dsmfg.com/> <
http://www.dsmfg.com/ <http://www.dsmfg.com/> >
<http://www.dsmfg.com/ <http://www.dsmfg.com/> <http://www.dsmfg.com/
<http://www.dsmfg.com/> > > >
> >
> > (Click the logo to view our site)
> >
> >
> >
> >
> >
> > [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]
Hmmm. I do have the SDK, but I didn't think my progress license was any
different on the server. (I am also running unix server side)



________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Nigel Kerley
Sent: Friday, May 29, 2009 12:32 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Help with an alert program for BAM








Hi Mike,

I'm still getting the same error.

I've copied/pasted your code into both the BPM and the .p file. I get
the "found" message in the server log, but immediately followed by "you
may not compile..."

Are you sure you don't have a different licence for Progress?

Nigel.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"Mike Anstey" <manstey@...> wrote:
>
> OK I just tested this and it works just fine! (I used ABCCode Update)
> with a Pre-processing Method directive.
>
>
>
> The method directive looks like this:
>
>
>
> FIND FIRST ttABCCode WHERE ttABCCode.RowMod = "U" or ttABCCode.RowMod
=
> "A" NO-LOCK NO-ERROR.
>
> message "found " ttabccode.ABCCode.
>
>
>
> IF AVAIL ttABCCode then DO:
>
> RUN ud\Test\testwritingUD01.p( input ttABCCode.ABCCode).
>
> END.
>
>
>
>
>
> To create the test program you can use a text editor and it does not
> have to be compiled. Also since there are no triggers on UD01 the
first
> line is not required:
>
>
>
> /* disable triggers for load of UD01. */
>
>
>
> DEFINE INPUT PARAM job-shortchar01 AS CHAR NO-UNDO.
>
> message "starting ud01".
>
> FIND FIRST UD01 WHERE UD01.KEY1 = job-shortchar01 NO-LOCK NO-ERROR.
>
> IF NOT AVAIL UD01 THEN
>
> DO:
>
> CREATE UD01.
>
> ASSIGN UD01.KEY1 = job-shortchar01.
>
> END.
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
> Of Nigel Kerley
> Sent: Friday, May 29, 2009 11:30 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Re: Help with an alert program for BAM
>
>
>
>
>
>
>
>
>
> Sorry, Mike, but I don't think so.
>
> I tried (more-or-less) exactly the same code as you have in the alert
> program and I got the following error in the DB log: "You may not
> compile programs that update the database in this version (490)".
>
> I get the same error displayed on-screen when I use that code in a BPM
> and click "Validate".
>
> Nigel.
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ,
> "Mike Anstey" <manstey@> wrote:
> >
> > I believe you can do it with a BPM (for an action pick "execute 4GL
> > code") you probably won't have a method call on JobOper.ShortChar01,
> but
> > you could probably use the Update method for JobEntry and you should
> be
> > fine.
> >
> >
> >
> > Something like this should work:
> >
> >
> >
> > FIND FIRST ttJobOper WHERE ttJobOper.rowmod = 'A' OR
ttJobOper.rowmod
> =
> > 'U' NO-LOCK NO-ERROR.
> >
> > IF AVAIL ttJobOper THEN
> >
> > DO:
> >
> > FIND FIRST UDxx. WHERE UDxx.Key1 = ttJobOper.ShortChar01 NO-ERROR.
> >
> > IF NOT AVAIL UDxx THEN
> >
> > DO:
> >
> > CREATE UDxx.
> >
> > ASSIGN UDxx.Key1 = ttJobOper.ShortChar01.
> >
> > And so on......
> >
> > END.
> >
> > END.
> >
> > If you want to debug to see if it is working just as a statement
like
> > this:
> >
> > Message "got this far". (don't forget the "." Or it won't work)
> >
> >
> >
> > Your message will show up in the server log file for whatever
database
> > you are running against e.g. mfgsys803.server.log
> >
> >
> >
> > Hope this helps.
> >
> > ________________________________
> >
> > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
> Behalf
> > Of Nigel Kerley
> > Sent: Friday, May 29, 2009 10:50 AM
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> > Subject: [Vantage] Re: Help with an alert program for BAM
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi Rob,
> >
> > I don't think it's possible to do this. With the Progress licence
that
> > comes with Vantage, it's not possible to write 4GL code that alters
> the
> > database.
> >
> > Epicor supplied the means of amending existing records (Run
> > lib\UpdateTableBuffer.p) but you can't add new records with this.
> >
> > If you knew someone with a Progress developers licence, you could
ask
> > them to compile a 4GL file for you and then it would work.
> >
> > One other thing I've recently found is a test .p file in UD\Test
> > "RunBOThru4GL.p". This (as the name suggests) is supposed to allow a
> > user run a Vantage BO from 4GL. If you could get it working maybe
you
> > could run the UD##.GetNewRecord directive from 4GL and then populate
> it.
> >
> > I had a quick look at it, got it to connect with the database, but I
> > haven't gotten any further. Anyone else ever looked at this?
> >
> > Nigel.
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com> , "Rob
> > Bucek" <rbucek@> wrote:
> > >
> > > I would like to create a new record in a UD table when a change is
> > made
> > > to the JobOper.ShortChar01 field. The alert program would first
have
> > to
> > > verify the record didn't exist (UD.Key1 field =
JobOper.ShortChar01)
> > and
> > > if it did not exist create a new record and then populate the
> > > Character01 field with a static string value concatenated with the
> > value
> > > from the JobOper.ShortChar01 field. If the record does exist, do
> > > nothing. Is this possible? Anyone have any code that does
something
> > > similar in concept I could work with? Thanks in advance!
> > >
> > >
> > >
> > > Rob Bucek
> > >
> > > Manufacturing Engineer
> > >
> > > PH: 715-284-5376 ext 311
> > >
> > > FAX: 715-284-4084
> > >
> > > <http://www.dsmfg.com/ <http://www.dsmfg.com/>
<http://www.dsmfg.com/ <http://www.dsmfg.com/> >
> <http://www.dsmfg.com/ <http://www.dsmfg.com/> <http://www.dsmfg.com/
<http://www.dsmfg.com/> > > >
> > >
> > > (Click the logo to view our site)
> > >
> > >
> > >
> > >
> > >
> > > [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]