qhld Command

Purpose

Holds and releases a spooled print job.

Syntax

qhld-r ] {  -#JobNumber -PQueue ] | -PQueue | -uUser-PQueue ] }

Description

The qhld command holds print jobs in a spooled state. The job to be held is designated by job number, queue, or user name. The -r flag releases the hold on the print job.

The 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 hold 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 hold job number 2123, specifying qhld -# 123, causes the qdaemon to hold the first matching job number it finds in its internal list, which may be 1123. By having the additional information that the qstatus -W provides, you can hold a specific job number.

Flags

Item Description
-#JobNumber Specifies the print job number to be held.
-PQueue Specifies the print queue to be held.
-r Releases the print job by number, queue, or user name.
-uUser Specifies the name of user whose print jobs are to be held.

Security

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To hold the print job number 300, enter:
    qhld -#300
  2. To hold all print jobs on queue lp0, enter:
    qhld -P lp0
  3. To hold all jobs that belong to user fred, enter:
    qhld -u fred
  4. To release job number 300, enter:
    qhld -#300 -r
  5. To release all the jobs on queue lp0, enter:
    qhld -Plp0 -r
  6. To release all jobs that belong to user fred, enter:
    qhld -u fred -r

Files

Item Description
/usr/sbin/qdaemon Contains the qdaemon daemon.
/var/spool/lpd/qdir/* Contains the job description files.
/var/spool/lpd/stat/* Contains information on the status of the devices.
/var/spool/qdaemon/* Contains the temporary copies of enqueued files.
/etc/qconfig Contains the configuration file.
/etc/qconfig.bin Contains the digested, binary version of the /etc/qconfig file.