I have trigger over a file that's being initiated before and after record update. How can I get the name of the program or utility that's updating the file?
Ps
there is an API available that gives the library and the program but it a lot slower.
Dave
daveslater
Hi
here is an ILE sup procedure using the message api's
P GetCaller B
D GetCaller PI 10A
*
* Receive Program Message API
*
D QMHRCVPM PR ExtPgm('QMHRCVPM')
D MsgInfo 32767A options(*varsize)
D MsgInfoLen 10I 0 const
D Format 8A const
D StackEntry 10A const
D StackCount 10I 0 const
D MsgType 10A const
D MsgKey 4A const
D WaitTime 10I 0 const
D MsgAction 10A const
D ErrorCode 8000A options(*varsize)
*
* Send Program Message API
*
D QMHSNDPM PR ExtPgm('QMHSNDPM')
D MessageID 7A const
D QualMsgF 20A const
D MsgData 32767A const options(*varsize)
D MsgDtaLen 10I 0 const
D MsgType 10A const
D CallStkEnt 10A const
D CallStkCnt 10I 0 const
D MessageKey 4A
D ErrorCode 8000A options(*varsize)
D RCVM0200 DS qualified
D Receiver 111 120A
D ErrorCode ds qualified
D BytesProv 10I 0 inz(%size(ErrorCode))
D BytesAvail 10I 0 inz(0)
there is an API available that gives the library and the program but it a lot slower.
Dave