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


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*

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page