The Default Output devices dialog looks like this:
This screen selects the default output devices your program will use in print procedures. The user may, however, override this setting from the command line or from within PROGRUN. You can set this information up whether or not a program initialises a print device in the Program Summary - the values set here provide the initial values for the standard variables concerned with printing. See Printing for more information on printing from QAB.
Enable this option to send output to the screen. How this works will depend on the print device selected and how DP4 is configured. Traditionally this just writes output directly to the screen as though it were a serial device, using the area not occupied by screen based maps to scroll in. For many programs this is of little use other than as "comfort output", to show that the program is working. On Windows based computers this can significantly slow down the creation of a report because scrolling the screen is a very slow operation. It is probably better to create a file and invoke a program such as the DP4 VIEW utility to allow the user to examine the file.
If you print to DFPRINT screen output goes to a temporary file that the user can view or print. It is intended to make a similar facility available for other print devices in the near future.
Enable this option to send output to one of the printers.
Enable this option to send output to a file.
On a multi-user machine (such as a machine running Unix with Telnet or dumb terminal users, (or a machine running Windows Terminal Services) you should always arrange for each user to have a unique login directory, which should be the current directory when DP4 programs are run. In DFSETUP the PRN directory should be left blank or should not have a leading /, to ensure file output is sent to a directory that does not conflict with other users. If you don't do this two users may try to create the same file at the same time.
Enter the printer name that selects characteristics to be used for hard copy and for formatting the print file. A drop-down menu lists the print devices available. If you
Enter the filename to be used for the print file.
Enable this option to delay printer output until the program ends. This may be useful for programs that produce only a small amount of output but which take a long time to run. In fact using this feature makes no difference on current releases of DP4.
Enable this option to ensure that the old output file is deleted and a new one created each time the program is run. Disable this option if you require the output during each session to be appended to an existing file.
Enable this option if you wish the user to be asked to select a print device at run time using the standard DP4 printer selection dialog. If you disable this option, the settings entered here will be used automatically unless over-ridden from the command line.
Enable this option if you want your output files not to contain printer control sequences. Output sent to the printer is unaffected. This option will be useful if you want output files to be be plain text files. If the control output is included in the files the file may look strange if opened by a program such as a word processor. The file may really only be suitable for copying direct to the appropriate print device.
When a program attempts to select a print device that is unavailable or off-line, the system displays an error message allowing the user to correct the problem and continue. If, instead of this, the user prefers to cancel the operation, the standard behaviour is to present the Select Output Devices dialog, which allows different output devices to be selected. If you disable this option, the whole of the procedure tree which selected the print device is aborted.