1752340 Members
6033 Online
108787 Solutions
New Discussion юеВ

VMS Print Queues

 
PaulJ_2
Occasional Contributor

VMS Print Queues

I need to capture the print stream of a print job in a VMS queue. Ideally, I would like the job to go to the printer and a copy of the print stream go to a location on the system in a directory. Is it possible to capture the print stream, (actually data that is sent to the printer), from a VMS print queue?

Thank you
PaulJ
12 REPLIES 12
Robert Gezelter
Honored Contributor

Re: VMS Print Queues

PaulJ,

First, please allow me to welcome you the OpenVMS Forum!

There are several questions that are relevant:
- How is the data being written?
- Is the data being written to a spooled printer (e.g., LPT1:, TTxxx:, etc.)?
- Is the data being written to a file which is then spooled for printing?
(The above should be straightforward to determine from the queue entry, if is not clear, please cut out the appropriate section of the output from a $ SHOW QUEUE/PRINT/FULL and attach it to the posting.)

Depending on the answer to the above, there are a variety of different solutions.

- Bob Gezelter, http://www.rlgsc.com
PaulJ_2
Occasional Contributor

Re: VMS Print Queues

-The data is being written by a cobol program using a PRINTER SELECT definition

-I believe it is a spooled printer

-I do not have a queue entry example, but here is the show queue


BLVA> show queue/full FMSDEN2
Printer queue FMSDEN2, idle, on BLVA::NLP46:, mounted form UHAWB
<7.231.123.200:8002 - IP chgd 3/27/07>
/BASE_PRIORITY=4 /DEFAULT=(FORM=UHAWB) /NOENABLE_GENERIC Lowercase
/OWNER=[SYSTEM] /PROCESSOR=MULTINET_STREAM_SYMBIONT
/PROTECTION=(S:M,O:D,G:R,W:SM) /RETAIN=ERROR
BLVA>
David Jones_21
Trusted Contributor

Re: VMS Print Queues

As others here like to say, "What problem are you trying to solve"? Capturing data sent to the printer has different meanings depending upon whether you are trying to diagnose a printer problem versus making some kind of audit trail.

If you are trying to diagnose a problem and it is a network printer, you could possibly use TCPTRACE to capture the dialog.
I'm looking for marbles all day long.
PaulJ_2
Occasional Contributor

Re: VMS Print Queues

Sorry, new project to eliminate the printing of data on forms. We are using some 3rd party software to process the print stream and mary it with an image of the form in a PDF file. The PDF file would then be sent to a new laser printer. We have tried using the Flat Text file but the 3rd party software is having a problem with it. The 3rd party software needs the actual Print Stream that is sent to the printer. So, my questions is, how can I capture this Print Stream to use as an input file for the new process?

Thank you
PaulJ
PaulJ_2
Occasional Contributor

Re: VMS Print Queues

Sorry, new project to eliminate the printing of data on forms. We are using some 3rd party software to process the print stream and marry it with an image of the form in a PDF file. The PDF file would then be sent to a new laser printer. We have tried using the Flat Text file but the 3rd party software is having a problem with it. The 3rd party software needs the actual Print Stream that is sent to the printer. So, my questions is, how can I capture this Print Stream to use as an input file for the new process?

Thank you
PaulJ
Robert Gezelter
Honored Contributor

Re: VMS Print Queues

PaulJ,

Having been down this path more than a few times, there are more details needed.

To start:
- Which third-party package?
- Exactly what are the COBOL statements used to open the file? What logical names are defined at the time that the file is opened?

This problem could be as simple as a parameter setting or a small change to the source program. I have seen it in the past. Without the details however, it is not possible to say.

- Bob Gezelter, http://www.rlgsc.com
P.S. If there is a lack of comfort with posting the details publicly, I can be contacted offline, as can other active contributors to this forum.
Robert Gezelter
Honored Contributor

Re: VMS Print Queues

PaulJ,

re: the SHOW QUEUE output. The printer appears to be a network printer. However, such a printer could be used as either the target of a file, or transparently spooled.

The correct solution depends on the answer.

- Bob Gezelter, http://www.rlgsc.com
Hoff
Honored Contributor

Re: VMS Print Queues

My usual off-the-cuff answer for "I need a print symbiont to do..." questions...

http://mvb.saic.com/freeware/freewarev80/execsymb/

Or roll your own symbiont. That's fully supported, and there are various examples around. dbs-nullsymbiont is on the same Freeware, and there are examples in the manuals and around the freeware at mvb.saic.com.

Use the google Site:mvb.saic.com keyword to restrict your Google search to the Freeware archives, as that site has an archive far larger than any Freeware archive at HP.

John Gillings
Honored Contributor

Re: VMS Print Queues

PaulJ,

If you find the idea of writing a symbiont too daunting, you could also try STOPping the queue and examining the entries that your program submits to it. Depending on the mechanism, the entry may point to a file, which you can access directly or copy elsewhere for processing.

So a quick and dirty implementation would be to keep the queue stopped, scan it every so often for pending entries, copy or process the files pointed to by the entries, then delete the entries when completed.

An even dirtier mechanism would be to direct the printer to a serial port, loop it back to a second serial port and have a process reading and processing the data as it arrives.
A crucible of informative mistakes