9 Output Operations
The local printer has the following characteristics:
All UX printers are supported with Eloquence when connected to an HP 700/92, HP 700/94, or HP Vectra.
[,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.
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:
RELEASE printer/port number
NOTE: The RELEASE statement is different from the RELEASE # statement. RELEASE # has to do with multiple task programming.