This function returns the file name of the current document. This function can only be used while the job is running and does not work in the Map Debugger.
GetFileName()