# PN5_60840

Updated: 1/18/2022, 5:31:44 PM
Created: 1/18/2022, 5:31:44 PM
Last Updated By: dependabot[bot]
Read Time: 1 minute(s)

# Description

PREWRITE trigger unable to amend the record on the file the trigger is on

# Previous Release Behavior

As an example, the following trigger code would not update attribute 6 of the record when it was written to the file on which the trigger was on:

SUBROUTINE prewrite_trigger(filevar, event, prerc, flags, recordkey, record, userrc)
EQU TRIGGER_TYPE_PREWRITE TO 1
IF event EQ TRIGGER_TYPE_PREWRITE THEN record<6> = "prewritten"
RETURN
1
2
3
4

# Current Release Behavior

PREWRITE trigger is now able to amend the record.

Back to 5.7.2 Release Notes