+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21

Thread: Front-ending trigger programs with CL

  1. #1
    K.Forsythe Guest

    Default Front-ending trigger programs with CL

    Can you explain why you would rather change the CL program and recompile it than remove the old trigger program and add a new one? How often do you change your trigger programs?

  2. Default Front-ending trigger programs with CL

    That's the point ! I would never have to update the CL. But, if I ever needed to update the program that I would have attached to the file, I would need to remove the trigger and add it back for the change to become effective.

  3. #3
    K.Forsythe Guest

    Default Front-ending trigger programs with CL

    Are you sure that you have to detach and reattach the trigger if the program is recompiled? I don't remember having that issue when I played with triggers before.

  4. Default Front-ending trigger programs with CL

    It was certainly an issue in the past..... We are V5R1.

  5. #5

    Default Front-ending trigger programs with CL

    I just did a little experiment. I added a variable to our Trigger program and assigned a value at Initialization then recompiled. So the program is different although not in any important respect. I then made a database change to a File that uses the Trigger program using our application software. The Trigger worked fine without having to remove and add it back to the Files (more than 1) that use the Trigger program. What you might be referring to is the fact that there can be no locks on any file that uses the Trigger Program at the time it is replaced. I did this in our Test environment and a single user had a lock on one of the Files that use the Trigger program. The program would not recompile until that lock was released. So by using a front-end CL you MIGHT be able to get away with recompiling the progam that's called from the CL even while you're Users are busily working away. But I would definitely test that assumption first. I would think that if the program remains in memory, you might have the same problem. Mike

  6. #6

    Default Front-ending trigger programs with CL

    Here's an additional reason to create a front end CLP: Suppose during the course of the day you have a program that waits for records to be added to a file and then processes those records. A trigger program cannot open a file that is being processed by the trigger. If you have a front end CLP, that can sense the firing of the trigger, and subsequently call another program that performs the actual processing. Dave

  7. Default Front-ending trigger programs with CL

    Does anyone have an example CL that will just receive the buffer and pass it to the RPG ?

  8. #8
    K.Forsythe Guest

    Default Front-ending trigger programs with CL

    I thought the Allow Repeated change made updating the same file and even the same record a valid (but confusing) option. Has anyone tried that recently?

  9. #9
    K.Forsythe Guest

    Default Front-ending trigger programs with CL

    Use two parameters and just pass them to the RPG program. It can parse the first one up into its parts. The second is a 4 byte binary length.
    Code

  10. #10
    Guest.Visitor Guest

    Default Front-ending trigger programs with CL

    Yes, ALWREPCHG(*YES) on a *BEFORE will let the trigger program update fields in the record before the system does the insert/update. Chris

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Trigger feedback to Application Programs
    By Guest.Visitor in forum Programming
    Replies: 9
    Last Post: 05-23-2002, 12:12 PM
  2. Trigger Programs And The Local Data Area?
    By S.Mildenberger in forum Programming
    Replies: 1
    Last Post: 09-20-2001, 06:39 AM
  3. Trigger Programs
    By Guest.Visitor in forum Programming
    Replies: 2
    Last Post: 06-08-2000, 07:29 AM
  4. I'm so far back I'm in front.....
    By Guest.Visitor in forum Application Software
    Replies: 4
    Last Post: 04-18-2000, 05:11 PM
  5. Print Front-Back
    By Guest.Visitor in forum Application Software
    Replies: 1
    Last Post: 01-31-2000, 09:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts