However, before you can add or activate any triggers, you must GRANT GRANT 
privileges to the user
   Attempting to add the triggers while you are the user uvsql if you want that 
user to be able
   To add triggers, otherwise, you will have to be user uvsql for any trigger 
activity.

I also found you can not have any "&" , "*" or "-" in the filename if you want 
to add triggers to it,
   If that is the case, you must create a Q pointer to the file with a name 
that is acceptable.

You can not add a trigger to a file that is a q pointer to another directory, 
UNLESS, you create
   The Q pointer as a F type Voc entry, and use the full pathname to the files 
- then it's not
   Technically a Q pointer, but still behaves like one!

These were things that I had the most trouble getting over....

Also, make sure any files that the trigger program will need are accessable. So 
if you put a trigger
   On a file, and the trigger program opens FILE A, and your in Account A - you 
must make sure that
   FILE A can be opened in Account A. If you move to Account B and the file 
that has the trigger on
   And you have a Q pointer to that file, make sure Account B has access to 
FILE A otherwise your
   Trigger program will bomb out.

George

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mark Eastwood
Sent: Thursday, July 18, 2013 8:33 AM
To: U2 Users List
Subject: Re: [U2] Universe Triggers

Yes. Check out the SQL Reference Manual.
The Trigger subroutine has a set defined number of parameters (it's in the doc).

We use account type Pick (non-Schema) so a few notes:
-Create a new VOC entry named ICATALOG (copy from CATALOG and change attr 6 to 
INFORMATION.FORMAT). Use this to catalog your Trigger Subroutine.
-When we add Triggers to files, we always have all users logged off (paranoid). 


Here's a sample trigger subroutine (not a real program, only a demo)
:       SUBROUTINE TRIGGER.EXAMPLE(TRIGGER.NAME,SCHEMA,TABLE,EVENT,TIME,
         NEW.RECORD.ID,NEW.RECORD,OLD.RECORD.ID,
        OLD.RECORD,ASSOCIATION,ASSOCIATION.EVENT,COUNT,CHAIN.CASCADE,CASCADE)
:       OPEN 'AUDIT' TO AUDIT ELSE RETURN
:       *
:       UPDATE.TYPE = EVENT[1,1]           ; * U,D,I
:       *
:       IF NEW.RECORD # OLD.RECORD THEN
:          READU X FROM AUDIT,NEW.RECORD.ID ELSE NULL
:          WRITE DATE():"*":TIME() ON AUDIT,NEW.RECORD.ID
:       END
:       RETURN                             ; * RETURN TO CALLING PROGRAM
:    END


Mark




-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Daniel Jorgenson
Sent: Wednesday, July 17, 2013 3:32 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Universe Triggers

Has anyone setup and used Unix/Universe triggers.  Where do you start? Any 
manuals to get started?


Regards,

Dan Jorgenson
Senior Systems Analyst

SICK, Inc.
6900 West 110th Street
Minneapolis, MN  55438  USA
Phone: 952.941.6780
Fax: 952.941.9287
Direct: 952.829.4732
http://www.sickusa.com

This message and any attachments are solely for the intended recipient and 
may contain confidential or privileged information.  If you are not the 
intended recipient, any disclosure, copying, use or distribution is 
prohibited.  If you have received this communication in error, please 
notify us by reply email and immediately and permanently delete this 
message and any attachments.  Thank you.
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to