STD.System.Log.getGlobalId ()
The getGlobalId gets the Global Id associated with the current query or workunit. Example:
IMPORT STD; STD.System.Log.getGlobalId();