Operating System - OpenVMS
1826388 Members
4861 Online
109692 Solutions
New Discussion

Re: duplicate print to two printer

 
SOLVED
Go to solution
Tim Nelson
Honored Contributor

duplicate print to two printer

I am looking for ideas to set up a queue to automatically print a job to two different printers at the same time.
The standard generic queue would load balance between the two printers but I would like the jobs duplicated.
Looking for ideas that are simple, transparent yet elegant.

Ideas:
1) create logical for print command that runs DCL that simply submits job to both queues.
2) modify print symbiont to duplicate the print process

Any other ideas ?

Thanks !!

Tim

12 REPLIES 12
David B Sneddon
Honored Contributor
Solution

Re: duplicate print to two printer

Tim,

We have a similar requirement here. I implemented
it via a background job looking at specifically
named queues and using logicals. The code is in BASIC
and the processing is fairly trivial, it just checks
the queues at regular intervals and does the right
thing.
If you want more info contact me at
dbsneddon at bigpond dot com.
Another option would be to look at EXECSYM which
can be found at Hunter Goatley's site at
http://vms.process.com/fileserv-software.html

Regards
Dave
Joseph Huber_1
Honored Contributor

Re: duplicate print to two printer

Another option: on some freeware and/or SIG tapes, there is a general symbiont software EXECSYMB. It basically runs any custom DCL command procedure, having all job parameters available.
It should be straightforward to write a DCL procedure to submit the files from there to the destination print queues with all the /form and /param qualifiers of the job.
And users still just do a PRINT command.
http://www.mpp.mpg.de/~huber
Antoniov.
Honored Contributor

Re: duplicate print to two printer

Tim,
what do you mean for Modify print symbiont?
Do you want recompile PRTSMB ?

I think you can write a your own dcl command and redefine PRINT command. However, it's simpler use Dave's application.

Antonio Vigliotti
Antonio Maria Vigliotti
Tim Nelson
Honored Contributor

Re: duplicate print to two printer

I saw the modification of a symbiont as a referenced option in the Managers guide and the old compaq search engine. That one seemed to complicated :)


Antoniov.
Honored Contributor

Re: duplicate print to two printer

Tim,
basically you have to define print command like follow command ended by twice double quotes:
$ PRINT=="@"
In myDclPrint you have to do something like this:
$ SET SYMBOL /SCOPE=(NOLOCAL,NOGLOBAL)
$ IF F$LOC("/QUE=MYQUE",P2).LT.F$LEN(P2)
$ THEN
$ SUBMIT 'P1' /QUE=2NDQUE 'P3' ...
$ ENDIF
$ SUBMIT 'P1' 'P2' 'P3' 'P4' 'P5' 'P6' ...
$ EXIT

It's just an example.

Antonio Vigliotti

Antonio Maria Vigliotti
Antoniov.
Honored Contributor

Re: duplicate print to two printer

===[Off topic post]===
Tim,
I hope you have e-mail reply active.
May I invite you to read here
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=950881

Thank you!

Antonio Vigliotti
===[Please no pts here]===
Antonio Maria Vigliotti
Uwe Zessin
Honored Contributor

Re: duplicate print to two printer

It's been 10+ years ago that I've implemented a similar solution using a server symbiont called "CTLSMB".

Now, a 'server symbiont' has nothing to do with a 'terminal server'. It can do all kinds of work. If you're familiar with VMS's DQS (Distributed Queueing System), you have already used server symbionts - they move jobs from one queue to a queue on a remote system.

The nice thing with a server queue is that an end-user can use standard '$PRINT' commands. In my case we had to duplicate print jobs for a local and a remote printer. A DCL procedure that was triggered by CTLSMB made two copies of the file, send one to the local print queue and the second one into a DQS queue which took the part of remote printing.

I've later used this technology (a server queue) to modify files that were received from an IBM mainframe through the DECnet/SNA PRinterEmulator to adapt them to our printing needs. Don't ask me how they got into that situation, but they had to misalign the papier in the line printer to get a correct output!! Of course, that did not work when we moved to a laser printer with individual sheets of paper...
.
David Jones_21
Trusted Contributor

Re: duplicate print to two printer

We have our DCPS queues configured to print to TCP ports on the local host that act as virtual printers. A daemon listens on the ports relays the traffic to the real HP and xerox printers on their point 9100. The daemon massages the traffic along way, such as echoing ctrl-D directly instead of sending it to a xerox (tektronix) printer. It's also useful for debugging some printing issues because you can directly capture the traffic.

A similar daemon could be made to route the traffic to 2 printers, but that would have the problem of deciding whose status responses to return to the print symbiont.
I'm looking for marbles all day long.
Tim Nelson
Honored Contributor

Re: duplicate print to two printer

All great ideas. Right now I am looking towards using the EXECSYMB symbiont as I do not currently wish to effect all printers. Redifining the PRINT command to use DCL is the easiest and probably could be written to ignore all other printers and pass along.

10 ways to skin a cat I guess but that is what I was looking for.

Thanks to all for the ideas !!!

Tim
Bojan Nemec
Honored Contributor

Re: duplicate print to two printer

Tim,

The EXECSYM its probably the simpliest way.

My idea is similar to Davids idea:
Write a TCPIP service which will catch the symbiont output and redirect it to two (or more printers). For testing purpouses I write a short DCL script which writes the symbiont output to two files. (Its my opinion that will be better to write a program):

$ open/read/write que sys$net
$ open/write prt1 sys$login:prt1.dat ! first printer
$ open/write prt2 sys$login:prt2.dat ! second printer
$l:
$ read que line/end=end
$ write/symbol prt1 line
$ write/symbol prt2 line
$ goto l
$end:
$ close prt1
$ close prt2
$ close que
$ logout


Now create a TCPIP service:

$ TCPIP SET SERVICE DOUBL /PORT=9100/FILE= -
/USER=/PROC=DOUBL/LIMIT=1
$ TCPIP ENABLE SERVICE DOUBL

When it is all OK dont forget:
$ TCPIP SET CONFIGURATION ENABLE SERVICE DOUBL


Now create a queue:

$ INIT/QUE/ON="localhost:9100" - /PROC=TCPIP$TELNETSYM DOUBL

If you try to print to the DOUBL queue you will receive two files on the login directory. Obvious you have to write to the two printers.

The second posibility is to print all jobs with the /TRAILER qualifier (you can instruct the queue to add the qualifier with /DEFAULT=TRAILER) and parse the trailer in which you receive all the informations on the job. When you are done, but before end of job you can copy the file to a safer position (to avoid deleting with the /DELETE qualifier) and resubmit the job with the same qualifiers in two different queues.

I use the second version to print XML files to a Linux machine, running FOP on these files with a stylesheet depending on the specified form and creating pdf files which can be directly printed or moved to the intranet web server.

Bojan
Jess Goodman
Esteemed Contributor

Re: duplicate print to two printer

Another idea is to use /RETAIN=ALWAYS on the PRINT command and a command procedure that polls the print queue using F$GETQUI and redirects any completed jobs to the second queue.

$ SET NOON
$OLOOP:
$ IF (F$GETQUI("DISPLAY_QUEUE",- "RETAINED_JOB_COUNT",-
"SYS$PRINT","WILDCARD") .GT. 0)
$ THEN
$ILOOP:
$ RETAIN = F$GETQUI("DISPLAY_JOB",-
"JOB_RETENTION",,"ALL_JOBS")
$ IF (RETAIN)
$ THEN
$ ENTRY = F$GETQUI("DISPLAY_JOB",-
"ENTRY_NUMBER",,"FREEZE_CONTEXT")
$ SET ENTRY 'ENTRY' /RETAIN=DEFAULT -
/REQUEUE=SYS$PRINT2 /RELEASE
$ ENDIF
$ IF (RETAIN .NES. "") THEN GOTO ILOOP
$ ENDIF
$ DUMMY = F$GETQUI("CANCEL_OPERATION")
$ WAIT 00:00:10
$ GOTO OLOOP
I have one, but it's personal.
Jess Goodman
Esteemed Contributor

Re: duplicate print to two printer

(following up my own post above)

Or if you don't want to change all the PRINT commands to add /RETAIN=ALWAYS, you can just modify the first print queue with SET QUEUE /RETAIN=ALL. I changed the command procedure to use keyword "JOB_RETAINED" instead of "JOB_RETENTION", and with this approach /RETAIN=DEFAULT is not necessary with SET ENTRY.

$ SET NOON
$OLOOP:
$ IF (F$GETQUI("DISPLAY_QUEUE",- "RETAINED_JOB_COUNT",-
"SYS$PRINT","WILDCARD") .GT. 0)
$ THEN
$ILOOP:
$ RETAIN = F$GETQUI("DISPLAY_JOB",-
"JOB_RETAINED",,"ALL_JOBS")
$ IF (RETAIN)
$ THEN
$ ENTRY = F$GETQUI("DISPLAY_JOB",-
"ENTRY_NUMBER",,"FREEZE_CONTEXT")
$ SET ENTRY 'ENTRY' -
/REQUEUE=SYS$PRINT2 /RELEASE
$ ENDIF
$ IF (RETAIN .NES. "") THEN GOTO ILOOP
$ ENDIF
$ DUMMY = F$GETQUI("CANCEL_OPERATION")
$ WAIT 00:00:10
$ GOTO OLOOP
I have one, but it's personal.