You can make use of "last referenced file" whenever you issue a series of commands against the same file. If you omit the name of the file, BIM-EDIT/XP will assume you wish to process the file you last referenced.
For example, the following commands will create a file and begin an Edit session of the file:
=> def file1
=> ed
Note that the file name was not specified for the FileEdit command (ed). The FileDefine command (def) set last referenced file, so the FileEdit command will create an Edit session of the file just created.
An often used command sequence that uses last referenced file is the following:
=> file;comp
The SessionFile command (file) updates the file on disk, closes the session, and sets last referenced file. The FileCompile command (comp) then compiles the file. Note that it was not necessary for the FileCompile command to specify a file name. Since a file was not specified, the last referenced file is compiled.