Operating System - HP-UX
1847571 Members
3526 Online
110265 Solutions
New Discussion

how to setup a fake printing queue in HP-UX so all jobs go to disk

 
SOLVED
Go to solution
lshu
Frequent Advisor

how to setup a fake printing queue in HP-UX so all jobs go to disk

Hi,

Is it possible to setup a "network printer" and have all the jobs in its queue written onto disk as files. These files can be processed / printed out later.

thanks
Lorne
10 REPLIES 10
Rita C Workman
Honored Contributor

Re: how to setup a fake printing queue in HP-UX so all jobs go to disk

Why not just buy a print spool management software that puts all print jobs out until released ?

Just a thought,
Rgrds,
Rita
Rita C Workman
Honored Contributor

Re: how to setup a fake printing queue in HP-UX so all jobs go to disk

...should have typed...

and have all the jobs go into a job queue (i.e. held on disk) until it is released by an operator to print.

Rita
Tim Nelson
Honored Contributor
Solution

Re: how to setup a fake printing queue in HP-UX so all jobs go to disk

idea 1) disable this print queue with the disable command. All jobs will be held on disk until released.

idea 2) printer interface files are just scripts. you can do anything you want in them

Give us more info on what the end result should be and we will give you better ideas.

Yogeeraj_1
Honored Contributor

Re: how to setup a fake printing queue in HP-UX so all jobs go to disk

hi Lorne,

> "network printer"
Queueing of jobs is not really affected by the fact that the printer maybe remote or local. They are treated similarly.

So, as mentioned by TOM above, you can just disable the queue ("disable ") and when you are ready to "release" them for print, you just to a "enable "

hope this helps too!

kind regards yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
lshu
Frequent Advisor

Re: how to setup a fake printing queue in HP-UX so all jobs go to disk

Thanks all of you. These are brilliant ideas to me and I will look into them and see what I get at the end.

Will keep you posted.

have a good weekend!
Lorne
Bill Hassell
Honored Contributor

Re: how to setup a fake printing queue in HP-UX so all jobs go to disk

As mentioned, the HP-UX spooler uses sc ripts to perform the printing. The tricky part is finding the parameters that your script will see when it is scheduled. I have attached a really simple lp script which you can modify to store the print job(s) into files.

If scripting is a problem, just create a dummy print queue, then disable it. All print jobs will store the print files in /var/spool/lp/request by printer name. And since it is disabled, the print jobs are already stored on disk. There will be a small control file along with the data file.


Bill Hassell, sysadmin
lshu
Frequent Advisor

Re: how to setup a fake printing queue in HP-UX so all jobs go to disk

Hi all,

I am looking into editing printer interface files and want to write all printing jobs onto disk to form 1 big file per day.

If you can provide some expertise on how to edit interface file, I'd very much appreciate.

thanks
Lorne
TTr
Honored Contributor

Re: how to setup a fake printing queue in HP-UX so all jobs go to disk

> I am looking into editing printer interface files and want to write all printing jobs onto disk to form 1 big file per day.

You can try that but an easier approach would be to write a script that runs after midnight and goes in the "request" area of the disabled queue and picks all the data files within the 24-hour period and cat-s them one by one and as it is cat-ing them it cancels the print jobm so that they are removed from the queue. You can put separator text blocks between each job too as you cat them.

I assume you only have pure text in your print jobs and no postscript etc.
lshu
Frequent Advisor

Re: how to setup a fake printing queue in HP-UX so all jobs go to disk

Hi all,

I used the script from Bill Hassell and edited it to fit my environment. It works just fine. (use it as a printer model script)

Bill, if you could reply and I would like to reward you with more points.

When I finishes my script, I will wrap this thread up.

thanks,
Lorne
Bill Hassell
Honored Contributor

Re: how to setup a fake printing queue in HP-UX so all jobs go to disk

Thanks. Be sure to tell us what changes you made that might help others with this task. The ITRC Forum is an all-volunteer group of users like yourself that share ideas and answers.


Bill Hassell, sysadmin