[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Commands Reference, Volume 1

cancel Command

Purpose

Cancels requests to a line printer.

Syntax

cancel { JobID ... | PrinterName }

or

cancel JobID QueueName

Description

The cancel command cancels line printer requests that were made by the lp command.

Specifying the following cancels the local print jobs:

In AIX 4.3.2 and above, qstatus was enhanced to improve the administration of local queues showing duplicate 3-digit job numbers. You can use the -W flag with the enq, qchk, lpstat, and lpq status commands to display more job number digits.

If your queue display shows duplicate 3-digit job numbers, use qchk -W to list job numbers with greater precision. You can then cancel a specific job.

For example, qchk might display job number 123 twice while, qchk -W would display job number 1123 and 2123. If you want to cancel job number 2123, specifying cancel 123, causes the qdaemon to cancel the first matching job number it finds in its internal list, which may be 1123. By having the additional information that the -W flag provides, you can cancel a specific job number.

And for remote print jobs, both the JobID and remote QueueName must be specified in order to explicitly cancel a job on a remote queue.

Notes:
  1. You must have root-user authority, or be a member of the print group, to cancel print requests that were not submitted by your current ID.
  2. The JobID must be a number.
  3. If you enter cancel -?, the system displays the following error message:
    enq: (FATAL ERROR): 0781-048: Bad queue or device name: -?

Exit Status

This command returns the following exit values:

0 Successful completion.
>0 An error occurred.

Files

/var/spool/qdaemon/* Contains temporary copies of enqueued files.
/var/spool/lpd/qdir/* Contains job description files for print jobs.
/usr/bin/cancel Contains the command file.

Related Information

The enable command, enq command, lp command, lpstat command, qcan command.

Canceling a Print Job (qcan Command) in AIX Version 4.3 System User's Guide: Operating System and Devices.

Printers, Print Jobs, and Queues Overview for Users in AIX Version 4.3 System User's Guide: Operating System and Devices.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]