A reserved printer is a printer to which only D3 can print. A printer can be attached to a serial or parallel port and reserved for a D3 virtual machine. Reserved printers are managed by the D3 spooler which submits jobs to D3 printer processes serving specified form queues. A reserved printer can be defined and started in a user-defined macro called user-coldstart in the dm account. This macro is used automatically during a coldstart or the normal boot process.
Complete these instructions to add a reserved printer.
Parallel Port
On AIX, a process cannot be started automatically on a parallel device through inittab. The process that uses the parallel port is started by the D3 user-coldstart macro.
When starting the system, the parallel printer must be online.See the AIX User Guide to locate the parallel port on the back of the system if necessary.
Log on to D3. Enter user-ID dm and master dictionary dm.
Select an unused D3 line number on which to start the printer.
In the example below, for a 128 user system, the last line number (127) is used.
Create the parallel printer if it is not already created using smit:
Log in as root, then type:
smit |
Select Devices.
Select Printer/Plotter.
Select Printer/Plotter Devices.
Select Add a Printer/Plotter.
Using the up and down arrow keys, select opp Other parallel printer or any suitable device.
Select parallel from the Printer/Plotter Interface screen.
Select the appropriate parallel port adapter from the Parent Adapter screen.
Enter P in the Port Number field.
Use the arrow keys; change Number of LINES per page to 999.
Use the arrow keys; change Number of COLUMNS per page to 999.
Use the TAB key; change Send all characters to printer UNMODIFIED to yes.
Use the TAB key; change Add CARRIAGE RETURNS to LINE FEEDS to no.
Use the TAB key; change Return on ERROR to yes.
Press ENTER to add the printer. The name of the printer AIX created displays. In the example below, lp0 is used.
Insert the statements below in the user-coldstart macro in the master dictionary of the dm account.
!exec d3 -127 -t lp0 -pprinter & startptr 0,0,0,s127 |
NOTE |
If no items have been previously placed in the user-coldstart, it opens as a new item. |
In this example, theAIXparallel printer device name is /dev/lp0.
NOTE |
The options to the TCL startptr command, such as the form queue number, printer number, and so on may vary. |
Serial Port
Log on to D3, then enter user-ID dm and master dictionary dm.
Select any unused D3 line number on which to start the printer.
In the example below, for a 128 user system, the last line number (127) is used.
Insert the statements below in the user-coldstart macro in the master dictionary of the dm account.
Note that the options to the startptr TCL command, such as the form queue number, printer number, and so on may vary.
!exec d3 -127 -t ttyxx -y "9600" -printer & startptr 0,0,0,s127 |
These statements define a serial printer on line 127 that is associated with /dev/ttyxx with a baud rate of 9600 (the default).
The first line describes the printer port for UNIX. UNIX will start a D3 process (D3 PIB 127) on ttyxx.The process is a serial device at 9600 baud and is a printer.
The second line describes the printer for D3. D3 will start printer 0, use D3 spooler form queue 0, with 0 page ejects on serial line (D3 PIB) 127.
The D3 command sp-kill returns the serial (or parallel) port to a user process state. To allow UNIX to use the printer attached to this port, the D3 process using it must be killed. To kill the process:
Log on to D3 and enter user-ID dm and master dictionary dm.
Type:
sp-kill dprinter.number kill pport.number |
These commands kill the UNIX process associated to the printer on port port.number.
See Also