All information about the status of the MIDAS plot package is stored in MIDAS keywords. This information describes the layout of the plot(s) to be produced, the last plot file created and the graphic device to which the result will be sent. Once a plot file (with extension .PLT) is created the user can send this file to another device than the default one. These two possibilities (default device name stored in keyword or device name from user input) make life somewhat more complicated, since the user may use MIDAS device names rather than the system names.
If the setup of the system is correctly done MIDAS knows three sets of device names. The first set contains the names of the graphics terminal, the graphic windows, and the display windows. The second one contains the system device names of the hardcopy devices, or a subset of that. Finally, a third set of names contains logical names (MIDAS device names) for a few of the devices in the second set.
To solve this complication the names for the hardcopy devices stored in the MIDAS keywords are identical to the system names. If a MIDAS device (logical) name is used, MIDAS will first convert this name into to the system name. If no corresponding system name is found a fatal error will be given. Once the system name is established the plot system knows which of the drivers has to be used in order to produce the plot. If a window or terminal name is used, or an abbreviation of that, MIDAS will expand that name to its full name known by the plot system.
The assignment of a graphics device as the output device is done in the procedure PLASSIGN.PRG.Copying the plotfile onto a hardcopy device is done by the prodecure SENDPLOT.PRG. Both procedures make use of the separate procedure CHECKDEV.PRG that checks to device names and, if required, converts MIDAS logical names into system name. The system names of all devices should be included in the file AGLDEVS.DAT which can be found in the directory ['MIDASHOME'.95NOV .SYSTAB.ASCII.PLOT]. For each device the file also gives the driver that will be used for that device.