[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 U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Universe Triggers
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: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, July 30, 2010 11:47 AM To: U2-Users@listserver.u2ug.org 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 U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users This e-mail (including any and all accompanying attachments) may contain privileged and confidential information only meant to be accessed and used by the intended recipient or the person(s) authorized to access and deliver the intended recipient's e-mail. This e-mail may contain information that is privileged or otherwise confidential. It should not be copied or forwarded to any unauthorized persons. If you received this e-mail in error, please delete it without copying or forwarding, and notify the sender by reply e-mail or by calling the MobilexUSA Privacy Office toll free at 1-866-686-1717. Thank you for your cooperation. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Universe Triggers
While the trigger needs to be globally cataloged, it can call a locally cataloged routine. Every trigger we have simply calls a 2nd locally cataloged program that does all the work. Without this, it makes testing very difficult between a system that has live/test accounts on the same box. John Israel Senior Programmer/Analyst Dayton Superior Corporation 1125 Byers Road Miamisburg, OHÂ 45342 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, July 30, 2010 1:12 PM 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: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, July 30, 2010 11:47 AM To: U2-Users@listserver.u2ug.org 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 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
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: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, July 30, 2010 11:47 AM To: U2-Users@listserver.u2ug.org 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 U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Universe Triggers
So far so good. Trigger installed. Trigger blows up. My trigger program calls the *MAIL.SEND routine (which works when called from other programs in this account) which is apparently blowing up when attempting to write an item to the current directory (UFD) at line 214. Anyone have a guess on what this means? Program *MAIL.SEND: Line 214, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process. Error performing trigger for /upg/CUBUPG/CO.TF -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Universe Triggers
Before any WRITE, you must do a READU first Mark -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, July 30, 2010 11:47 AM To: U2 Users List Subject: Re: [U2] Universe Triggers So far so good. Trigger installed. Trigger blows up. My trigger program calls the *MAIL.SEND routine (which works when called from other programs in this account) which is apparently blowing up when attempting to write an item to the current directory (UFD) at line 214. Anyone have a guess on what this means? Program *MAIL.SEND: Line 214, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process. Error performing trigger for /upg/CUBUPG/CO.TF -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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
Re: [U2] Universe Triggers
Lock the record before you write it. Henry Unger Sent from my iPad On Jul 30, 2010, at 2:47 PM, Jeff Schasny jscha...@gmail.com wrote: So far so good. Trigger installed. Trigger blows up. My trigger program calls the *MAIL.SEND routine (which works when called from other programs in this account) which is apparently blowing up when attempting to write an item to the current directory (UFD) at line 214. Anyone have a guess on what this means? Program *MAIL.SEND: Line 214, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process. Error performing trigger for /upg/CUBUPG/CO.TF -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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
Re: [U2] Universe Triggers
Thank you all. After much putzing with the various parts involved it is beginning to look like my original plan of having an email message sent when someone adds a new record to this file is not to be. Apparently executing an SH verb in a trigger program is not going to happen (Verb SH illegal when a transaction is active.). Boom Splat. Henry Unger wrote: Lock the record before you write it. Henry Unger Sent from my iPad On Jul 30, 2010, at 2:47 PM, Jeff Schasny jscha...@gmail.com wrote: So far so good. Trigger installed. Trigger blows up. My trigger program calls the *MAIL.SEND routine (which works when called from other programs in this account) which is apparently blowing up when attempting to write an item to the current directory (UFD) at line 214. Anyone have a guess on what this means? Program *MAIL.SEND: Line 214, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process. Error performing trigger for /upg/CUBUPG/CO.TF -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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 -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Universe Triggers
How real-time does it need to be? Could you write them to a queue file and have a small batch process pick them up and email them? Rob Robert F. Porter, MCSE, CCNA, ZCE Lead Sr. Programmer / Analyst Laboratory Information Services Ochsner Health System This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. Jeff Schasny jscha...@gmail.com 7/30/2010 2:47 PM Thank you all. After much putzing with the various parts involved it is beginning to look like my original plan of having an email message sent when someone adds a new record to this file is not to be. Apparently executing an SH verb in a trigger program is not going to happen (Verb SH illegal when a transaction is active.). Boom Splat. Henry Unger wrote: Lock the record before you write it. Henry Unger Sent from my iPad On Jul 30, 2010, at 2:47 PM, Jeff Schasny jscha...@gmail.com wrote: So far so good. Trigger installed. Trigger blows up. My trigger program calls the *MAIL.SEND routine (which works when called from other programs in this account) which is apparently blowing up when attempting to write an item to the current directory (UFD) at line 214. Anyone have a guess on what this means? Program *MAIL.SEND: Line 214, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process. Error performing trigger for /upg/CUBUPG/CO.TF -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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 -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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
Re: [U2] Universe Triggers
We have a similar process - we have the Trigger write a record to an audit file. Then there's a separate Phantom running that's polling the audit file and doing what-ever. Mark -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, July 30, 2010 12:47 PM To: U2 Users List Subject: Re: [U2] Universe Triggers Thank you all. After much putzing with the various parts involved it is beginning to look like my original plan of having an email message sent when someone adds a new record to this file is not to be. Apparently executing an SH verb in a trigger program is not going to happen (Verb SH illegal when a transaction is active.). Boom Splat. Henry Unger wrote: Lock the record before you write it. Henry Unger Sent from my iPad On Jul 30, 2010, at 2:47 PM, Jeff Schasny jscha...@gmail.com wrote: So far so good. Trigger installed. Trigger blows up. My trigger program calls the *MAIL.SEND routine (which works when called from other programs in this account) which is apparently blowing up when attempting to write an item to the current directory (UFD) at line 214. Anyone have a guess on what this means? Program *MAIL.SEND: Line 214, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process. Error performing trigger for /upg/CUBUPG/CO.TF -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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 -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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
Re: [U2] Universe Triggers
Have the subroutine that's called from your trigger routine write a record into a file with the details for emailing. Then create a program that runs in cron that reads that file and sends your emails 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: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, July 30, 2010 3:47 PM To: U2 Users List Subject: Re: [U2] Universe Triggers Thank you all. After much putzing with the various parts involved it is beginning to look like my original plan of having an email message sent when someone adds a new record to this file is not to be. Apparently executing an SH verb in a trigger program is not going to happen (Verb SH illegal when a transaction is active.). Boom Splat. Henry Unger wrote: Lock the record before you write it. Henry Unger Sent from my iPad On Jul 30, 2010, at 2:47 PM, Jeff Schasny jscha...@gmail.com wrote: So far so good. Trigger installed. Trigger blows up. My trigger program calls the *MAIL.SEND routine (which works when called from other programs in this account) which is apparently blowing up when attempting to write an item to the current directory (UFD) at line 214. Anyone have a guess on what this means? Program *MAIL.SEND: Line 214, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process. Error performing trigger for /upg/CUBUPG/CO.TF -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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 -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users This e-mail (including any and all accompanying attachments) may contain privileged and confidential information only meant to be accessed and used by the intended recipient or the person(s) authorized to access and deliver the intended recipient's e-mail. This e-mail may contain information that is privileged or otherwise confidential. It should not be copied or forwarded to any unauthorized persons. If you received this e-mail in error, please delete it without copying or forwarding, and notify the sender by reply e-mail or by calling the MobilexUSA Privacy Office toll free at 1-866-686-1717. Thank you for your cooperation. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Universe Triggers
Yeah, thats what I've been thinking. Thanks all. Barry Rutherford wrote: Have the subroutine that's called from your trigger routine write a record into a file with the details for emailing. Then create a program that runs in cron that reads that file and sends your emails 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: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, July 30, 2010 3:47 PM To: U2 Users List Subject: Re: [U2] Universe Triggers Thank you all. After much putzing with the various parts involved it is beginning to look like my original plan of having an email message sent when someone adds a new record to this file is not to be. Apparently executing an SH verb in a trigger program is not going to happen (Verb SH illegal when a transaction is active.). Boom Splat. Henry Unger wrote: Lock the record before you write it. Henry Unger Sent from my iPad On Jul 30, 2010, at 2:47 PM, Jeff Schasny jscha...@gmail.com wrote: So far so good. Trigger installed. Trigger blows up. My trigger program calls the *MAIL.SEND routine (which works when called from other programs in this account) which is apparently blowing up when attempting to write an item to the current directory (UFD) at line 214. Anyone have a guess on what this means? Program *MAIL.SEND: Line 214, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process. Error performing trigger for /upg/CUBUPG/CO.TF -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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 -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Universe Triggers
I was wondering if that's what you're up to. I'm not at my computer, but try PHANTOMing it. Henry Unger Sent from my iPad On Jul 30, 2010, at 3:48 PM, Jeff Schasny jscha...@gmail.com wrote: Thank you all. After much putzing with the various parts involved it is beginning to look like my original plan of having an email message sent when someone adds a new record to this file is not to be. Apparently executing an SH verb in a trigger program is not going to happen (Verb SH illegal when a transaction is active.). Boom Splat. Henry Unger wrote: Lock the record before you write it. Henry Unger Sent from my iPad On Jul 30, 2010, at 2:47 PM, Jeff Schasny jscha...@gmail.com wrote: So far so good. Trigger installed. Trigger blows up. My trigger program calls the *MAIL.SEND routine (which works when called from other programs in this account) which is apparently blowing up when attempting to write an item to the current directory (UFD) at line 214. Anyone have a guess on what this means? Program *MAIL.SEND: Line 214, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process. Error performing trigger for /upg/CUBUPG/CO.TF -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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 -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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
Re: [U2] Universe Triggers
In summary, to get triggers working as you want in UV you need to: a) Have a stub subroutine which is globally catalogued b) This stub subroutine is the one which you attach to the trigger c) This stub subroutine calls the main subroutine which does all the work The benefit of this is the stub subroutine will rarely change and so you will not Have to go through the whole drop/create trigger scenario. UV seems to keep Track if the called subroutine changes and will cause a runtime error if it has. You are then free to change your main subroutine as often as you like. You should Probably only catalog it though when the system is quiescent. d) If you want to execute a command from TCL which is on the banned list. Unban it e) On attribute 4 of the VOC entry for the verb e.g. SH, add an H to the list of letters. f) This will allow you to perform the command with a transaction. A trigger has an implicit transaction. This however does not get around the issue of trying to debug a program which accesses A file with a trigger on. If you execute a write or delete on this file while debugging then You will get an errorbut this is a separate issue and a pet peeve of mine which is hopefully Getting sorted. We have been using this for years with no adverse effects, but you do need to be aware that you Will not be able to rollback what you are doing...In the case of emailing though this is probably Not something that you care about. Regards, -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of Barry Rutherford Sent: Saturday, 31 July 2010 8:01 a.m. To: U2 Users List Subject: Re: [U2] Universe Triggers Have the subroutine that's called from your trigger routine write a record into a file with the details for emailing. Then create a program that runs in cron that reads that file and sends your emails 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: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, July 30, 2010 3:47 PM To: U2 Users List Subject: Re: [U2] Universe Triggers Thank you all. After much putzing with the various parts involved it is beginning to look like my original plan of having an email message sent when someone adds a new record to this file is not to be. Apparently executing an SH verb in a trigger program is not going to happen (Verb SH illegal when a transaction is active.). Boom Splat. Henry Unger wrote: Lock the record before you write it. Henry Unger Sent from my iPad On Jul 30, 2010, at 2:47 PM, Jeff Schasny jscha...@gmail.com wrote: So far so good. Trigger installed. Trigger blows up. My trigger program calls the *MAIL.SEND routine (which works when called from other programs in this account) which is apparently blowing up when attempting to write an item to the current directory (UFD) at line 214. Anyone have a guess on what this means? Program *MAIL.SEND: Line 214, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process. Error performing trigger for /upg/CUBUPG/CO.TF -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ 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 -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users This e-mail (including any and all accompanying attachments) may contain privileged and confidential information only meant to be accessed and used by the intended recipient or the person(s) authorized to access and deliver the intended recipient's e-mail. This e-mail may contain information that is privileged or otherwise confidential. It should not be copied or forwarded to any unauthorized persons. If you received this e-mail in error, please delete it without copying or forwarding, and notify the sender by reply e-mail or by calling the MobilexUSA Privacy Office toll free at 1-866-686-1717. Thank you for your cooperation.
Re: [U2] 24 X 7 MV systems
Nick, Dawn, Tony, David, Glen, John, Jeff, Bill, everyone. Thanks for the posts on this thread. There is good material for me to share with the rest of our team and hopefully overcome inertia and set some new direction. Thank you. -Baker -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dawn Wolthuis Sent: Thursday, July 29, 2010 4:53 PM To: U2 Users List Subject: Re: [U2] 24 X 7 MV systems You said MV system rather than something more specific, so I would encourage you to look at Cache'. I think it has the best features in the MV space in this regard (as well as scalability and other ilities). --dawn This communication, its contents and any file attachments transmitted with it are intended solely for the addressee(s) and may contain confidential proprietary information. Access by any other party without the express written permission of the sender is STRICTLY PROHIBITED. If you have received this communication in error you may not copy, distribute or use the contents, attachments or information in any way. Please destroy it and contact the sender. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Universe Triggers
dont forget that if the file is distributed that it requires a trigger on each file part. From: u2-users-boun...@listserver.u2ug.org [u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny [jscha...@gmail.com] 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: u2-users-boun...@listserver.u2ug.orgmailto:u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, July 30, 2010 11:47 AM To: U2-Users@listserver.u2ug.orgmailto:U2-Users@listserver.u2ug.org 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 U2-Users@listserver.u2ug.orgmailto: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
Re: [U2] 24 X 7 MV systems
1. When I buy electronic components, the first place I look is Mouser. I find it a kick that Mouser is running U2. 2. If it can be revealed... the servers there that run U2... are they all Windows Servers?... Are some, any, or all *nix machines? --Bill -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker Hughes Sent: Friday, July 30, 2010 4:51 PM To: 'U2 Users List' Subject: Re: [U2] 24 X 7 MV systems Nick, Dawn, Tony, David, Glen, John, Jeff, Bill, everyone. Thanks for the posts on this thread. There is good material for me to share with the rest of our team and hopefully overcome inertia and set some new direction. Thank you. -Baker -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dawn Wolthuis Sent: Thursday, July 29, 2010 4:53 PM To: U2 Users List Subject: Re: [U2] 24 X 7 MV systems You said MV system rather than something more specific, so I would encourage you to look at Cache'. I think it has the best features in the MV space in this regard (as well as scalability and other ilities). --dawn This communication, its contents and any file attachments transmitted with it are intended solely for the addressee(s) and may contain confidential proprietary information. Access by any other party without the express written permission of the sender is STRICTLY PROHIBITED. If you have received this communication in error you may not copy, distribute or use the contents, attachments or information in any way. Please destroy it and contact the sender. ___ 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