Keep in mind the trigger could also be fired off from editing a DB2 file
directly in Excel, ODBC, etc.
Creating trigger programs
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/dbp/rbaforzahftrb.htm
In there you can drill down to what's in the trigger buffer.
There is nothing specific in the trigger buffer pertaining to process or
current user profile (which may not be the job user).
Why do you need to know what process?
If the trigger is called by INV300 then display some 5250 window if
there is an error?
If the trigger is called by STRSQL then display a message or throw an
SQL exception?
If the trigger is called by Excel ...?
Or are you doing this because you want your own audit process and using
journaling or temporal tables is out of the question because they are too
thorough and easy to use?
Not a whole lot of information as to the process which called this trigger
in an RPG PSDS
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzasd/psdsdt9.htm
However I do see the PSDS does support current user profile starting is
position 358.
How good are you at analyzing call stacks, etc, to find the process which
fired this trigger?
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.