STD.System.Job.WUID ( )
The WUID function returns the workunit identifier of the current job. This is the same as the WORKUNIT compile time constant.
Example:
A := STD.System.Job.WUID();