Writing Real Programs in DCL, Second Edition

THIS CHAPTER DISCUSSES METHODS for displaying output during the execution of a procedure. The word display is used because today most interactive users have access to graphics displays or video display terminals rather than hardcopy terminals. DCL provides facilities for displaying text and simple graphics on video terminals and web pages. Such facilities are used in procedures to present results, status information, and error messages. See Chap.25, p.319
The user's terminal or web browser has both an input and an output capability. DCL treats these two functions of a terminal as separate devices: an input device, which receives keystrokes from the keyboard, and an output device, which displays characters on the video screen. When a user logs in, Open VMS creates a process to execute programs on behalf of the user. Associated with this process is a process-permanent file, which can be used to write to the video screen. This output file is assigned the logical name SYS$OUTPUT and is always available. Text is displayed on the terminal by writing to SYS$OUTPUT. See Sec.20.5, p.269
Text is displayed with the WRITE command. This command takes two arguments. The first is a logical name referring to the file that is to receive the output (note that it is a logical name, not a symbol). The second is an expression or list of expressions whose values are to be written. When you want to display text on the terminal, use the logical name