Two options that immediately come to mind but that are not directly linked to a trigger program are: 1) start journalling on the file OR 2)force the program(s) that update the file to generate joblogs either by selecting an appropriate job description or by using the CHGJOBA (Change Job Attributes)command.
Determining the job is easy — if the trigger is CL, use RTVJOBA JOB(); if RPG, retrieve job name from the PSDS… in other words, have the trigger retrieve the name of the current job.
Determining the program is trickier. You need to process the call stack. There are three general ways to do this — use the Retrieve Call Stack (QWVRCSTK) API (at V5R4 & above), send/receive messages to/from entries higher in the call stack or use the Qp0zDumpStack()–Dump Formatted Stack Trace Data–API. In short, walk the call stack, eliminating entries above the trigger that can be determined are data management entries. When you reach a call stack entry that’s not data management, you’ve at least reached a procedure in the program you’re looking for.
Better idea is to journal the changes and simply read the resulting journal entries.