Announcement

Announcement Module
Collapse
No announcement yet.

Trigger bombing on program library

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trigger bombing on program library

    We added a trigger to a file a month ago. Once a month our system moves program objects up the library list. When the trigger was attached the program object was in ULIB. The program object was moved to ALIB and then the trigger bombed because it was looking for the program object in ULIB. When we attached the trigger to the file we used *LIBL/pgmname for the trigger program parm on the ADDPFTRG command. Why didn't the trigger just go up the library list instead of searching for the program object in a specific library?

  • #2
    When you add a trigger to a file with *LIBL for the trigger program library, the *LIBL is only used at the time of the ADDPFTRG to find the trigger program. For example, I executed this command:

    ADDPFTRG FILE(BRUCELIB/X834MHP)
    TRGTIME(*AFTER)
    TRGEVENT(*UPDATE)
    PGM(*LIBL/TGRPG001)

    When I did a DSPFD on file X834MHP, I saw that the library of the trigger program was BRUCELIB; at the time I executed the ADDPFTRG, the command searched my *LIBL and found TGRPG001 in library BRUCELIB.

    Trigger Description
    Trigger name . . . . . . . . . . . . . . . : TRG QSYS_TRIG_BRUCELI
    B___X834MHP____000001
    Trigger library . . . . . . . . . . . . . : BRUCELIB
    Trigger state . . . . . . . . . . . . . . : STATE *ENABLED
    Trigger status . . . . . . . . . . . . . : *OPERATIVE
    Trigger event . . . . . . . . . . . . . . : TRGEVENT *UPDATE
    Trigger time . . . . . . . . . . . . . . : TRGTIME *AFTER
    Allow repeated change . . . . . . . . . . : ALWREPCHG *NO
    Trigger update condition . . . . . . . . : TRGUPDCND *ALWAYS
    Program Name . . . . . . . . . . . . . . : PGM TGRPG001
    Library . . . . . . . . . . . . . . . . : BRUCELIB

    I know I didn't exactly answer your question, but I think I did clear up the useage of *LIBL for the trigger program name, on the ADDPFTRG command.

    Comment

    Working...
    X