ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Changing AFTER READ data in a trigger

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

  • Changing AFTER READ data in a trigger

    I would like to code an AFTER READ trigger that updates some of the data in the record before passing it on to the calling program.
    IBM documentation is not clear if ALWREPCHG(*YES) is valid with AFTER READ.
    Is it? If not, how can I accomplish this?

  • #2
    Well, a READ event can't change the data in the file, so I don't think ALWREPCHG would apply?

    I'm assuming you don't want to change the file itself, but rather want to do some calculations and fill in field data before it is handed to the program. Seems like this should work fine.

    Comment

    Working...
    X