9 Output Operations

Printers

System Printer

The system printer has the following characteristics:

Eloquence supports the "Underline" enhancement and all "PRINT" statements. Individual printer features can be used with the aid of the "PRINTER ISTRANSPARENT" option, which allows all codes to be sent to the printer.

Local Printer

NOTE: Local Printers are available with a character oriented user interface, only.

The local printer has the following characteristics:

You are also provided with the "PRINTER ISTRANSPARENT" option. However, some codes (for example, 0, 5, and 127 on the HP 700/92) are stripped by the terminal. The remaining features of the local printer are the same as for the system printer.

All UX printers are supported with Eloquence when connected to an HP 700/92, HP 700/94, or HP Vectra.

The PRINTER IS Statement

The PRINTER IS statement assigns the output device for PRINT and PRINT USING operations. Refer to page 254 for information on the syntax of the PRINTER IS statement.

The SYSTEM PRINTER IS Statement

The SYSTEM PRINTER IS statement assigns the output device for all successive SYSTEM outputs. This includes CAT, LIST, FETCH, COMMAND "!", single-step, and TRACE operations. Refer to page 254 for information on the syntax of the SYSTEM PRINTER IS statement.

The PRINT ALL IS Statement

To obtain a permanent copy of all operator and system interactions, use the PRINT ALL IS statement to specify a device other than the display. Syntax for the statements related to output device assignment is as follows:

[,WIDTH] [,TRANSPARENT]

Printer number is an integer which states the number of a printer, port, or display screen. The possible printer numbers are -2 to 99. The printer number for the display screen is 8. The printer numbers for printers and ports are assigned in the configuration files.

Line width is a numeric expression (-1, or 20 to 264) which specifies the number of characters per line output by PRINT and PRINT USING. If omitted, line width assumes the previously set value. If no value was previously set or the system was turned off and on, the line width value defaults to 80 for terminals and 132 for other devices. Specifying -1 sets an infinite line width.

File specifier is a spool file, where all outputs are recorded in hp-ux format. For more details, see page 292 at the end of this chapter.

Each successive PRINTER IS statement cancels the previous one. Note, however, that the line width parameter of any future PRINT ALL IS or SYSTEM PRINTER IS statement will also determine the line width for the current PRINTER IS statement for that device. (This allows multiple users to each assign their own line width to the same printer.)

NOTE: If printer number is defined as FILE in the configuration file, it is locked into the specific eloqcore process to avoid printing conflicts.

The REQUEST Statement

The REQUEST statement requests the use of a printer or port. Syntax for this command is as follows:

REQUEST printer/port number [,return variable]

The printer/port number is an integer expression evaluating to the number of the requested printer or port. Valid printer/port numbers are listed in this chapter under page 252 . The parameter return variable should be replaced with a valid variable name, if this parameter is desired.

The REQUEST statement first checks to see if the requested device is a printer or a port. Printers and ports are defined in the user, group, and global configuration files using the PRINTER and PORT statements.

If the return variable is omitted and the device is already reserved by another program, ERROR 131 results. If the requested device is not defined in the user, group, or global configuration file, ERROR 132 results.

If the return variable is pre-set to 0, the request is carried out in WAIT mode: that is, if requesting an already reserved port, program execution will wait until the port becomes avaliable. If the return variable is pre-set to 1, there will be no wait and [1] is returned (see below).

If the requested device is a port, the corresponding HP-UX device file is locked, reserving it for your use.

The value returned to the return variable, if present, is based upon the following criteria:

NOTE: The REQUEST statement is different from the REQUEST # statement. REQUEST # has to do with multiple task programming.

The RELEASE Statement

The RELEASE statement cancels any previous REQUEST for the specified device. Note that it is not necessary to RELEASE a printer. This is because a printer is not locked at the time the REQUEST is started. Syntax for the RELEASE statement is as follows:

RELEASE printer/port number

NOTE: The RELEASE statement is different from the RELEASE # statement. RELEASE # has to do with multiple task programming.


Eloquence Language Manual - 19 DEC 2002