xcall MIAMEX, MX_PRFSPEC, string
MX_PRFSPEC (MIAMEX 26) retrieves the last processed file specification and formats it in standard DevPPN format (i.e. dev#:file.ext[p,pn]) where dev# and [p,pn] are omitted if the file is on the current device or in the current directory.
As a practical matter, the last processed filespec will be the one last processed via MX_FSPEC.