Data analysis
i know you can attach a trigger to a physical file, but can you attach one to a print file or even a display file. thanks in advance

Answer Wiki

Thanks. We'll let you know when a new response is added.

no, you can not. A trigger is a program runned by DB2 for you

Discuss This Question: 4  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • rarogerson
    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
    0 pointsBadges:
  • Cowboypgmr
    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.
    0 pointsBadges:
  • astradyne
    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
    370 pointsBadges:
  • TomLiotta
    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
    125,585 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: