The STATIONNAME task attribute is the preferred method of specifying the station where remote files should be opened. However, MARC does not assign the STATIONNAME attribute of programs or WFL jobs initiated from a MARC session. It is therefore advisable for you to explicitly assign a STATIONNAME value to any interactive processes originating from a MARC session.
For example, you can include the following statement in WFL jobs initiated from a MARC session:
MYSELF(STATIONNAME = #MYSELF(SOURCENAME));
This STATIONNAME value is inherited by any tasks of the WFL job, and enables them to open remote files successfully.
The STATION task attribute can be used for a similar purpose. However, the STATIONNAME task attribute is more reliable than STATION, because STATION stores a logical station number (LSN) that is subject to change.
The Communicating with Interactive Processes in MARC subsection pointed out that MARC opens a task window to enable a process to communicate with a user through a remote file. You can use the AUTOSWITCHTOMARC attribute to affect the handling of the task window for users. If you set the AUTOSWITCHTOMARC task attribute to TRUE, then users of the program are automatically transferred from the task window to the originating screen when the process terminates. If AUTOSWITCHTOMARC is FALSE, then the user must press the SPCFY key to return to the originating screen.

