[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 1


cancel Command

The cancel command includes information for cancel on a POWER-based platform and the System V Print Subsystem cancel on a POWER-based platform and an Itanium-based platform.

cancel Command on POWER-based Platform

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 5L Version 5.1 System User's Guide: Operating System and Devices.

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

cancel Command on POWER-based platforms and Itanium-based platforms

Note: This is a System V Print Subsystem command.

Purpose

Cancel print requests

Syntax

cancel [request-IDs] [printers]

cancel -u login-IDs [printers]

Description

The cancel command allows users to cancel print requests previously sent with the lp command. The first form of cancel permits cancellation of requests based on their request-ID. The second form of cancel permits cancellation of requests based on the login-ID of their owner.

Canceling a print request

The cancel command cancels requests for print jobs made with the lp command. The first form allows a user to specify one or more request-IDs of print jobs to be canceled. Alternatively, the user can specify one or more printers, on which only the currently printing job will be canceled if it is the user's job.

The second form of cancel cancels all jobs for users specified in login-IDs. In this form the printers option can be used to restrict the printers on which the users' jobs will be canceled. Note that in this form, when the printers option is used, all jobs queued by the users for those printers will be canceled. A printer class is not a valid argument.

A user without special privileges can cancel only requests that are associated with his or her own login ID; To cancel a request, a user issues the command:

cancel -u login-ID [printer]

This command cancels all print requests associated with the login-ID of the user making the request, either on all printers (by default) or on the printer specified.

Administrative users with the appropriate privileges can cancel jobs submitted by any user by issuing the following types of commands:

cancel -u "login-ID-list"
Cancels all requests (on all relevant printers) by the specified users, including those jobs currently being printed. Double quotes must be used around login-ID-list if the list contains blanks. The argument login-ID-list may include any or all of the following constructs:

login-ID
a user on the local system

system-name!login-ID
a user on system system-name

system-name!all
all users on system system-name

all!login-ID
a user on all systems

all
all users on the local system

all!all
all users on all systems

A remote job can be canceled only if it originated on the client system; that is, a server system can cancel jobs that came from a client, and a client system can cancel jobs it sent to a server.

cancel -u "login-ID-list" printer-1 printer-2 printer-n
Cancels all requests by the specified users for the specified printers, including those jobs currently being printed. (For a complete list of printers available on your system, execute the lpstat -p command.)

In any of these cases, the cancellation of a request that is currently printing frees the printer to print the next request.

Related Information

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

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

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


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]