


I'm a little confused - the QTEMP library is just that, a temporary library, so any files in it are surely only being used as work files for the current job. As soon as the job completes, the contents of the QTEMP library will be removed.
Having said that, there is no reason why you cannot add a trigger to a file in QTEMP the same as you can to any database file in any library.
The following worked on my box:
ADDPFTRG FILE(QTEMP/SADP006A)
TRGTIME(*BEFORE)
TRGEVENT(*UPDATE)
PGM(QGPL/TRGR001A)
The only prerequisites being that a) the file existed in my jobs QTEMP, and b) the trigger program being called also existed.
Also, bear in mind that each job has its own QTEMP which is not generally accessible by other jobs.
Hope this helps
Jonathan
no, you can not. A trigger is a program runned by DB2 for you


Agreed, this answer is no, a trigger is attached to a physical file or table. Perhaps if you gave a short description of what you are attempting to accomplish someone may be able to give you advise on alternative solutions.
Rob
my main purpose in trying to do something of that nature is because most of the files we use are qtemp. i’ve not been able to attach anything to those. the program i’m wanting to watch has a print file and a display but no true physical file that gets built. the files that are read by this program are read by numerous programs.
Even if “most of the files” are in QTEMP, what does that have to do with wanting to add triggers to printer or display files? Triggers are database functions. What good would it actually do to have a trigger on a display file? (BTW, you can do things like STRCPYSCN to capture display output and CPYSPLF to capture printer output. What else would you want to do that would make any sense?)
Tom