Stopping a Printer with the STOPPTR Command

This topic describes the process of stopping an operational printer. The method of stopping a printer is to execute the STOPPTR command at TCL. The function of this command is determined by the current operational state of the printer. A printer has four states:

UNDEFINED

Device is not currently defined as a printer.

READY

Printer is ready to receive and print jobs from its queue(s).

WORKING

Printer is printing a print job.

STOPPED

Printer is waiting for instructions.

Use the STOPPTR command when you need to stop a printer when it has no current print jobs. If a print job is currently on the printer when you issue the command, the printer will not be stopped until the job has finished printing.

This command requires SYS2 privileges as it affects a system resource that is available to all users. Stopping a printer is usually done prior to removing the printer from the system, since STOPPTR allows the current print job to finish first.

Stopping a printer, in effect, tells the Spooler that the printer is offline. If the printer is inactive at the time the STOPPTR command is issued, no additional jobs will be sent to it. If the printer is active, the current print job will finish.

Format

STOPPTR [n [-m]] [B] [W]

Parameter(s)

n

Number of the printer you want to stop. If no printer is specified, printer number 0 is stopped.

n-m

Specifies a range of printers.

B

Stops all printers.

W

Causes the process to wait until the printer is inactive before it returns the terminal to the TCL prompt.

Use the STARTPTR command (from the SYSPROG account) to restart the printer, or to remove the printer using the SP-KILL Command.

Once the printer is inactive, it is safe to remove it from the system using the SP-KILL command with the D option. (SYS2 privileges are required to use this option.)

Example

This command line provides one example for using the STOPPTR command:

>STOPPTR 5

PRINTER #5 SET TO STOP BUT IS STILL ACTIVE.

Because Printer 5 is active, STOPPTR allows the current job to continue printing. When that job is completed, the status of the printer is STOPPED AND INACTIVE.

See Also

Using mvBase Printers

Overview of Printer Operation

Starting a Printer with the STARTPTR Command

Restarting a Printer with the STARTPTR Command

Checking the Status of Printers with the LISTPTR Command

Removing a Printer from the System with the SP-KILL Command