RE: [U2] Trigger help

2007-07-09 Thread Dean.Armbruster
I didn't see a post for B, so here is mine:

Inside your trigger routine, use SYSTEM(49) to dump the program stack.
@LOGNAME will give you the user running it.  Report them in a fashion
most helpful to you, e.g. write it to a log, send an email, etc.
SYSTEM(51) may also be helpful.



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Norman Morgan
 Sent: Wednesday, June 27, 2007 12:09 PM
 To: u2-users@listserver.u2ug.org
 Subject: [U2] Trigger help
 
 It's time to wave the white flag and display my ignorance.  
 After all these years of writing MV code, I am attempting to 
 use a trigger routine for the first time.  I need to find out 
 what is causing the mysterious disappearance of the 
 contents of certain fields in our PRODUCT master file.  It 
 looks like an update trigger would be the best way, but how do
 I:
 
 A) compare the before and after images of the record to catch 
 changes in those fields
 B) determine what program is doing the felonious update and 
 what user is running it.
 
 I can do all of these easily in an SB+ subroutine, but it 
 looks like I need to do it in barefoot UniBasic.
 
 Can someone give me some pointers?
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Trigger help

2007-06-27 Thread Dave Davis
In unidata:

1. Before image you could just read the record from the file.
2. After image is what's in the record parameter passed into the trigger
subroutine.
3. You need different subroutines for the BEFORE UPDATE trigger and the
BEFORE DELETE trigger, as they take different numbers of parameters.  

I've never used an SB+ subroutine inside of a trigger.  Not sure if that
would work.  The problem with doing that is, what happens if a non-SB+
application is performing the file updates? 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Norman Morgan
Sent: Wednesday, June 27, 2007 12:09 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Trigger help

It's time to wave the white flag and display my ignorance.  After all
these years of writing MV code, I am attempting to use a trigger routine
for the first time.  I need to find out what is causing the mysterious
disappearance of the contents of certain fields in our PRODUCT master
file.  It looks like an update trigger would be the best way, but how do
I:

A) compare the before and after images of the record to catch changes in
those fields
B) determine what program is doing the felonious update and what user is
running it.

I can do all of these easily in an SB+ subroutine, but it looks like I
need to do it in barefoot UniBasic.

Can someone give me some pointers?

===
Norman Morgan  [EMAIL PROTECTED]  http://www.brake.com
===
A Basic programmer's girlfriend wears a G$
===
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Trigger help

2007-06-27 Thread Cordes, Tom (contractor)
Norman,

Unidata:

The person running the CREATE.TRIGGER verb needs to be the owner of the file
you are adding a trigger to and the trigger program needs to be globally
cataloged.

HELP CREATE.TRIGGER should get you started.

Tom 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dave Davis
Sent: Wednesday, June 27, 2007 1:34 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Trigger help

In unidata:

1. Before image you could just read the record from the file.
2. After image is what's in the record parameter passed into the trigger
subroutine.
3. You need different subroutines for the BEFORE UPDATE trigger and the
BEFORE DELETE trigger, as they take different numbers of parameters.  

I've never used an SB+ subroutine inside of a trigger.  Not sure if that
would work.  The problem with doing that is, what happens if a non-SB+
application is performing the file updates? 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Norman Morgan
Sent: Wednesday, June 27, 2007 12:09 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Trigger help

It's time to wave the white flag and display my ignorance.  After all these
years of writing MV code, I am attempting to use a trigger routine for the
first time.  I need to find out what is causing the mysterious
disappearance of the contents of certain fields in our PRODUCT master file.
It looks like an update trigger would be the best way, but how do
I:

A) compare the before and after images of the record to catch changes in
those fields
B) determine what program is doing the felonious update and what user is
running it.

I can do all of these easily in an SB+ subroutine, but it looks like I need
to do it in barefoot UniBasic.

Can someone give me some pointers?

===
Norman Morgan  [EMAIL PROTECTED]  http://www.brake.com
===
A Basic programmer's girlfriend wears a G$
===
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/