OUTPUT parameter

You use the OUTPUT parameter to specify whether the output from the display command will be shown on the display, printed, or written to an output file.

Basically, the same information is provided whether the output is displayed, printed, or written; only the format is changed as necessary to present the information in the best format for the device. For example, because there are more lines on a printed page than on a display, column headings are not repeated as often in printed output.

If the output is to be shown on the display, it will be sent to the work station that issued the display command. It will be shown in the format specified in the display device file used by that display command. A different device file is used for the output of each display command, and the file is different for displayed, printed, or written file output. In most cases, the name of the command is part of the file names of either type of device file.

If the output will be printed, it is spooled and an entry is placed on the job's output queue. The output can be printed depending on which device is specified in the Start Printer Writer (STRPRTWTR) command.

Note: Although the IBM® -supplied printer files are shipped with SPOOL(*YES) specified, they can be changed to SPOOL(*NO) by the Override with Printer File (OVRPRTF) and Change Printer File (CHGPRTF) commands.

If the OUTPUT parameter is not specified in the display command, the default value * is assumed. The output resulting from this value depends on the type of job that entered the command. The following table shows how the output is produced for interactive and batch jobs.

Table 1. Output for interactive and batch
Output Interactive Job Batch Job
*   Displayed   Printed  
*PRINT Printed Printed

Values allowed

*
Output requested by an interactive job is shown on the display. Output requested by a batch job is printed with the job's spooled output.
*PRINT
The output is printed with the job's spooled output.
*OUTFILE
The only output is to be written to a specified database file.