A TRIGGER_DEFINE program is a program that you create and that Oracle OLAP checks for by name when a DEFINE statement executes. When the program exists in the same analytic workspace in which you are defining a new object, Oracle OLAP executes the program.
Note:The USETRIGGERS option must be set to its default value of
TRUEfor a TRIGGER_DEFINE program to execute
See also:"Trigger Programs".
To create a program with the name
TRIGGER_DEFINE, follow the guidelines presented in "Trigger Programs".
Assume that you have written a TRIGGER_DEFINE program with the following description in your analytic workspace.
DEFINE TRIGGER_DEFINE PROGRAM PROGRAM SHOW JOINCHARS ('calltype = ' CALLTYPE) SHOW JOINCHARS ('triggering event = ' TRIGGER(EVENT)) SHOW JOINCHARS ('fully-qualified object name ='TRIGGER(NAME)) SHOW JOINCHARS ('type of object = 'OBJ(TYPE TRIGGER(NAME)) DESCRIBE &TRIGGER(NAME) END
Assume, as shown in the following statements, that you issue a DEFINE VARIABLE statement to define a variable named
myvar. As shown by the output following the statement, Oracle OLAP defines the variable and executes the TRIGGER_DEFINE program.
DEFINE myvar VARIABLE TEXT calltype = TRIGGER triggering event = DEFINE fully-qualified object name =MYAW!MYVAR type of object = VARIABLE DEFINE MYVAR VARIABLE TEXT