My interpretation of the question is you have something like
INPUT ...
...
END INPUT
IF int_flag THEN
# Don't update database
ELSE
# Update database
END IF
If the user accepts the dialog, the code to update the database is going to execute. If the user has not made any changes in the INPUT then this could be considered a waste of time.
I know with Genero, we have added syntax so that you can better detect that changes have occurred in the dialog and thus only update the database if a change has occurred. http://www.4js.com/online_documentation/fjs-fgl-manual-html/#c_fgl_prog_dialogs_touched_flag.html
If still on old 4gl, field_touched should be available to you. I know we can do
AFTER INPUT
IF int_flag THEN
EXIT INPUT
END IF
IF field_touched(*) THEN
# User has made a change in the dialog
and by using * test all fields in the dialog without explicitly having to list them, you may have to list the fields explicitly. So it might be simpler than you think to test after the dialog.
Similarly for complex data structures with records and arrays, in Genero we can do comparisons by parsing to JSON or XML, and then to string, so those techniques can also make the before/after comparison one liners.
Otherwise if you want to do the test after the database statement has executed, triggers might be an option for you. Create the triggers to insert a record into an audit table only if a genuine change has occurred in the UPDATE.