× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



My 7.1 SQL Ref doesn't show a "PROGRAM NAME" clause for the CREATE TRIGGER...

But the online version here does...
http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/topic/db2/rbafzhctrigger.htm

Looks like this was/is added with a technical refresh...
https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/IBM%20i%20Technology%20Updates/page/Support%20PROGRAM%20NAME%20on%20CREATE%20TRIGGER

Perhaps you don't have it?

Charles

On Tue, Oct 30, 2012 at 2:01 PM, Rich Herdman <rherdman@xxxxxxxxx> wrote:
While creating triggers in V7R1 using SQL, I am trying to use the "PROGRAM
NAME" parm listed in the V7R1 SQL Ref book to specify the short name of the
object and I cannot get it to work.


In my simplistic exmaple below:

create trigger trigger_test_1
after insert on trigtestf
for each row mode db2sql
update trigtestf set b = a+1, ts = current_timestamp
where b < 10


It creates a *PGM object named TRIGG00001.

However the CREATE TRIGGER documentation in the SQL Reference guide says

"*PROGRAM NAME **external-program-name*

Specifies the unqualified name of the program to be created for the
trigger. The

name must be the unqualified form of an
*external-program-name*. The qualifier

for the program name will be the same as the implicit or explicit qualifier
for
*

trigger-name
*".

If I am reading that correctly, adding the statement "PROGRAM NAME
TRIGTESTT" should make it create a *PGM object named TRIGTESTT instead of
the system-generated name TRIGG00001. It is not recognizing PROGRAM NAME
as a valid option.

Has anyone gotten this to work, or am I confused? Thanks!

*Rich Herdman*
rherdman@xxxxxxxxx
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.