Operating System - HP-UX
1836472 Members
2732 Online
110101 Solutions
New Discussion

Re: Moving spooled job to another printer

 
SOLVED
Go to solution
Stuart Powell
Super Advisor

Moving spooled job to another printer

I've been looking around in the man pages for a command to move spooled print jobs from one printer to another. Is there such a command or am I dreaming?
Sometimes the best answer is another question
6 REPLIES 6
Timo Ruiter
Advisor
Solution

Re: Moving spooled job to another printer

Try the lpalt command.
Remember that once printing has begun, you cannot redirect it any longer.

Regards,

Timo
Confucius say: he who runs through forrest in straight line will hit tree
Stuart Powell
Super Advisor

Re: Moving spooled job to another printer

I found the answer. I should have searched the problem resolution area first. The command to use in lpmove. The only catch is that the scheduler has to be down first.
Anybody with recent experience of lpmove that could shed anymore light on the subject is welcome to respond.

Thanks.
Sometimes the best answer is another question
Pete Randall
Outstanding Contributor

Re: Moving spooled job to another printer

Stuart Powell
Super Advisor

Re: Moving spooled job to another printer

Thanks for the help. I had found lpmove but didn't find lpalt until your messages.

Stuart
Sometimes the best answer is another question
Robert-Jan Goossens
Honored Contributor

Re: Moving spooled job to another printer

Hi,

try this,

jr0001:{root}# lpstat pt0060
pt0060-10 root 3896 Nov 04 14:00

jr0001:{root}# lpmove pt0060-10 nt13:pt0060
total of 1 requests moved to pt0060

where nt13 is a name of another printserver.


Regards,

Robert-Jan.
Belinda Dermody
Super Advisor

Re: Moving spooled job to another printer

Here is a little script that I wrote
!/bin/sh
#
# LPMOVE6.SH Shell script to use the lpalt command to move a group
# of files from one print que to another.
#
# Arguements Two(2) are required, you need the original printer
# and the new destination printer name.
#
#
# lpmove6.sh , 1.2
# 09/14/00 , 16:25:27
#
# 08/22/00 JAM Sr
#============================================================================


ORG_PRTR=6
NEW_PRTR=va22_hp21

# create the file of print outputs
while [ 0 ]
do
echo `date` Checking the $ORG_PRTR queue for print request
HR=`date +%H`
if [ $HR -gt 17 ]; then
exit
else
lpstat -o${ORG_PRTR} |grep ^${ORG_PRTR} |awk '{print $1}' > /tmp/prt.log
if [ -s /tmp/prt.log ]; then
for i in `cat /tmp/prt.log`
do
echo $i
lpalt ${i} -d${NEW_PRTR}
done
fi
sleep 300
fi
done

rm /tmp/prt.log