dont forget that if the file is distributed that it requires a trigger on each 
file part.


________________________________
From: [email protected] 
[[email protected]] On Behalf Of Jeff Schasny 
[[email protected]]
Sent: Friday, July 30, 2010 10:12 AM
To: U2 Users List
Subject: Re: [U2] Universe Triggers

Thank You.

Now I need to drop the trigger and re create it. What is the drop
trigger syntax? Is all this actually documented somewhere?

Barry Rutherford wrote:
> Your subroutine has to be globally cataloged - nothing else will work.
>
> The syntax of the create trigger that works for me is this:
>
> CREATE TRIGGER BEFORE_INSERT BEFORE INSERT ON (FILE NAME) FOR EACH ROW
> CALLING "*(subroutine name)"
>
> BEFORE_INSERT - name I gave my trigger - can be anything you want
> (FILE NAME) - File trigger is attached to
> *(subroutine name) - globally cataloged subroutine that you want called
>
> Your sample subroutine below has 15 passed-in parameters and my programs
> only have 14 - I think you repeated the last one twice.
>
> Do I need to open the file to the SQLTRIG variable in the program? - No
> Do I need to open the dictionary to SCHEMA? - No
>
> Barry Rutherford
> Programmer / Analyst
> MobilexUSA
> 930 Ridgebrook Rd, 3rd Floor
> Sparks, MD 21152
> Local: 443-662-4101 x 6162
> Toll Free: 800-786-8015 x 6162
> Fax: 443-662-4225
> http://www.mobilexusa.com
>
>
> -----Original Message-----
> From: 
> [email protected]<mailto:[email protected]>
> [mailto:[email protected]] On Behalf Of Jeff Schasny
> Sent: Friday, July 30, 2010 11:47 AM
> To: [email protected]<mailto:[email protected]>
> Subject: [U2] Universe Triggers
>
> AIX 5.3 UV 10.2Universe
>
> I want to put a trigger on a file to send an email message then a new
> item is written. I have read the (very non-helpful) section on triggers
> in the Universe System Description documentation but I'm still a bit
> confused. I have a program (subroutine) written with the arguments as
> established in the manual:
>
> 0001: SUBROUTINE
> NEW_TRANSFER(SQLTRIG,SCHEMA,TABLE,EVENT,TIME,NEWID,NEWREC,OLD
> ID,OLDREC,ASSOC,ASSOC.EVENT,COUNT,CHAIN,CASCADE,CASCADE)
>
> Do I need to open the file to the SQLTRIG variable in the program?
> Do I need to open the dictionary to SCHEMA?
>
>
> I'm assuming that trigger_name below should be the catalog name of the
> program"
>
>
> CREATE TRIGGER trigger_name [BEFORE | AFTER] INSERT
>
> Can someone provide a concise series of steps I need to take to set this
> up?
>
>

--
------------------------------------------------------------------------
Jeff Schasny - Denver, Co, USA
jschasny at gmail dot com
------------------------------------------------------------------------
_______________________________________________
U2-Users mailing list
[email protected]<mailto:[email protected]>
http://listserver.u2ug.org/mailman/listinfo/u2-users
________________________________
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to