One of the problems I've had since moving to UniData on AIX in 2001 is being able to monitor and/or control Print Jobs and Form Queues once AIX has the file. I found I could do a lot of maintenance using
smit, but that seemed a bit tedious.
I did some research and created a few useful PA commands in the VOC file. I can use these at the SB+ TCL command prompt to simplify my life. Here they are for your free use!! Note the use of the <<angle bracket>> options to prompt for missing parameters.
Command Summary:
LP [
queue] - List Printer - Show all jobs waiting to print. Limit to specified queue if needed.
001: PA
002: IF <<C2,QUEUE>> = '' THEN GO L100
003: !lpstat -p<<C2,QUEUE>> | more
004: GO DONE
005: L100: !lpstat | more
006: DONE: *
LPQ - List Printer Queue - Show *nix Statistics for files waiting to print
001: PA
002: !ls -lt /var/spool/qdaemon
MOVE.JOB
jobnum newqueue - Move a job to a different print queue (e.g., when stuck behind a large job)
001: PA
002: !qmov -m <<I3,NEW QUEUE>> -# <<I2,JOB ID>>
MOVE.QUEUE
oldqueue newqueue - Move all jobs to a different queue (e.g., when printer is out of service)
001: PA
002: !qmov -m <<I3,NEW QUEUE>> -P <<I2,OLD QUEUE>>
HOLD.JOB
jobnum - Puts a print job on "Hold", so it won't print
001: PA
002: !qhld -# <<I2,JOB ID>>
REL.JOB
jobnum - Release a previously held job
001: PA
002: !qhld -r -# <<I2,JOB ID>>
These two commands are also useful, but I haven't created PA items for them.
!disable
queue - Disables a queue, marking it
down!enable
queue - Restarts a down queue
Hope these help...
--Tom