Precisely Speaking
May 18, 2012, 03:01:35 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: So what's news with you?  Tell us about it in "Getting To Know You"!
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Controlling *nix Print Queues and Jobs with UniData VOC/PA Commands  (Read 2595 times)
Tom Pellitieri
Rock Star
*****
Posts: 170


Tom Pellitieri - Toledo, Ohio


« on: September 18, 2008, 02:44:51 PM »

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.
Code:
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
Code:
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)
Code:
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)
Code:
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
Code:
001: PA
002: !qhld -# <<I2,JOB ID>>

REL.JOB jobnum - Release a previously held job
Code:
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
« Last Edit: September 18, 2008, 02:48:01 PM by Tom Pellitieri » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!