Operating System - OpenVMS
1752729 Members
5712 Online
108789 Solutions
New Discussion юеВ

Re: See content of a printer queue

 
SOLVED
Go to solution
Yyrkoon
Advisor

See content of a printer queue


Hi all,
I have a program which is sending data to a printer queue. My problem is that I would like to put this data into a file but I cannot modify program code. Can I redirect the queue to a file or see the content on this queue or something like that?

Thanks in advance.
8 REPLIES 8
P Muralidhar Kini
Honored Contributor

Re: See content of a printer queue

Hi Yyrkoon,

>> I have a program which is sending data to a printer queue.
Looks like you have a program which is printing data by sending it to a printer queue.

>> My problem is that I would like to put this data into a file but I cannot modify
>> program code.
The best & neat way to achieve this would be to modify the program itself.
Any particular reason that you dont want to modify your program ?

Also in case you redirect the output to a file, do you still want the data to get
printed ?

Regards,
Murali
Let There Be Rock - AC/DC
Yyrkoon
Advisor

Re: See content of a printer queue

Murali,
The program does not belong to my team, so despite we have the source code we are not authorize to change it.

I just can count with a queue with data to print, and of course with your kind knowledge :-)
P Muralidhar Kini
Honored Contributor

Re: See content of a printer queue

Hi Yyrkoon,

Discussion on a similar requirement -
http://www.computing.net/answers/openvms/print-queue-send-to-text-file/504.html

Looks like you can do it using the EXECSYMB (Executive Symbiont) utility.
You can find this in the openVMS freeware site -
http://www.openvms.compaq.com/openvms/freeware/

Check the above links and see it that suits your requirement.

Hope this helps.

Regards,
Murali
Let There Be Rock - AC/DC
Yyrkoon
Advisor

Re: See content of a printer queue

Ok, I gonna see what can I do with that.

Many thanks.
Joseph Huber_1
Honored Contributor

Re: See content of a printer queue


If going the EXECSYMB way, and the queue-name can't be changed (in the program or via logical name),
delete and re-create the original printer-queue under a different queue name.
Then create the EXECSYMB queue with the name of the old printer-queue.
The command-file executing under EXECSYMB can be rather trivial:
1. retrieve the queued file and user specification.
2. copy the file to the wanted user- or system-directory.

As an example how to retrieve the user and file/specs from the queue symbiont, see for example my convert-x-to-ps command file:
http://wwwvms.mppmu.mpg.de/vms$common/execsymb/CNV_ANSI_PS.COM
http://www.mpp.mpg.de/~huber
Steve Reece_3
Trusted Contributor
Solution

Re: See content of a printer queue

How does your program refer to the printer queue and how does it send the data? These are fairly important in providing any advice.

For example, if the data that the program is sending to the printer are just sent to a logical name on a spooled device then it may be feasible to use a logical name assignment (e.g. define/user outputfile sys$login:theoutput.txt)
If, on the other hand, the output is sent to a text file and a system service is then used to submit the job to the queue and delete the source file then you could set the queue to retain all jobs and then have a cleanup job read the entries, append the contents of the entries to a single text file then delete the retained entry.

There are probably as many ways as there are entries in the queue but the correct one depends on what you've got now.

"If I was going to , I wouldn't start from here."
Yyrkoon
Advisor

Re: See content of a printer queue

Thanks all.

Finally we have done what Steve says, pause the queue and get messages, is not so clean but usefull enough for our goal.

Thanks again.
Yyrkoon
Advisor

Re: See content of a printer queue

I close this.