Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Trigger?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Trigger?

    Ringer Software - 07:17pm Dec 13, 2004 PST (6.1.1.2) Show us the ADDPFTRG commands you used.. ADDPFTRG FILE(TDEDOFA) TRGTIME(*BEFORE) +
    TRGEVENT(*INSERT) PGM(TD606R8) +
    RPLTRG(*YES) ALWREPCHG(*YES)
    ADDPFTRG FILE(TDEDOFA) TRGTIME(*BEFORE) +
    TRGEVENT(*UPDATE) PGM(TD606R8) +
    RPLTRG(*YES) ALWREPCHG(*YES)
    I used it *BEFORE when trying to modify the buffer. I used it *AFTER when trying to update from the RPG. I thought I read in the Red Book on "Stored Procedures, Triggers and User Defined Functions" that you must be using commitment control to be able to modify the buffer and have it apply. But now I don't see it. Maybe I accidentally used the *AFTER when doing the buffer change. I don't think so, but I'll go test it again. -dan

    Comment


    • #17
      Trigger?

      I have an issue in which I wanted to get the name of the program that update a file. Instead of using Journal, I will write a simple trigger program that fires when a record is added or change in a file, but instead of getting the before or after image of the record, I want to capture the name of the program that update the file. Is it possible? Thanks, Tiki

      Comment


      • #18
        Trigger?

        Following program gets caller name(&PGM)when is called from other program. Dont need send any PARMS to it. Use it as a trigger program. It might work. I did not try it myself. Good luck.
        Code

        Comment


        • #19
          Trigger?

          CHGVAR code must look like: CHGVAR &PGM VALUE(%SST(&SENDER 56 10))

          Comment


          • #20
            Trigger?

            I don't think that technique works across activation group boundaries. This is a FAQ. Search MC Online and www.iSeriesNetwork.com for downloadable code. Chris

            Comment


            • #21
              Trigger?

              Hi I'm interested in writing trigger program. I've browse through many sites (including http://www-1.ibm.com/servers/eserver.../db2code.html) and redbooks. But I still cannot figure out how to do it. Anybody has any good working examples? Or at least show me how the source in the mentioned site works. Thanks!

              Comment


              • #22
                Trigger?

                Check out my tech tip on triggers: Timothy A. Grove "TechTip: Changing Triggers on a Busy System" 4/23/02 11:45am This technique makes them easily maintainable.

                Comment

                Working...
                X