Operating System - OpenVMS
1753360 Members
4705 Online
108792 Solutions
New Discussion юеВ

Determining "SPOOLED" Device

 
SOLVED
Go to solution
Jack Trachtman
Super Advisor

Determining "SPOOLED" Device

We have a number of LTA devices defined which are in turn set to spool output to telnetsym print queues (via the SET DEV/SPOOLED=(que-name, device) LTAnnn: cmd).

Is there a way to use DCL lexicals to start with a print que name and find which LTA device is spooling to it?

If the above can't be done, is it possible to look at an LTA device to see which print que it is spooled to?

TIA
14 REPLIES 14
Mike Kier
Valued Contributor

Re: Determining "SPOOLED" Device

This gets the spooled MultiNet devices, so it ought to work for spooled LAT devices as well:

f$GetQUI("DISPLAY_QUEUE", "DEVICE_NAME", "actual_queue_name")
Practice Random Acts of VMS Marketing
Jack Trachtman
Super Advisor

Re: Determining "SPOOLED" Device

The lexical you suggest returns the queue's printer's DNS name and port number, and not the spooled device I'm looking for.

But your suggestion made me realize that there is probably *no* direct connection between a print queue and any device that may be feeding it, i.e. the print queue doesn't need to know from where it got the print request.

So - my second question: how to look at an LTA device to see what print queue it is spooled to?
Dave Lennon
Advisor

Re: Determining "SPOOLED" Device

Jack,
Here's an "oldie but goodie" - watch out for formatting problems...

http://wwwvms.mppmu.mpg.de/vmssig/src/MAR/getspl.mar

Let us know if it still works...

Later,
Dave
Dave Lennon
Advisor

Re: Determining "SPOOLED" Device

If you have too much trouble with the above, this link looks better to me on a peecee...

http://vmsone.com/~decuslib/vaxsig/vax92b/alpha/hints/spooldev.code
John Gillings
Honored Contributor

Re: Determining "SPOOLED" Device

Jack,

You can use F$DEVICE to scan all LTA devices, and F$GETDVI to determine if they're spooled, and find the device name.

Attached is a sample command procedure
(one attachment per response, see next for the remainder of your question).

A crucible of informative mistakes
John Gillings
Honored Contributor

Re: Determining "SPOOLED" Device

Finding all queues pointing at spooled devices can be done with F$GETQUI. An example procedure is attached.

Note the "FREEZE_CONTEXT" on the specific "DISPLAY_QUEUE" - this is required to maintain the context of the wildcard QLOOP. You will also need it on any other "DISPLAY_QUEUE" calls if you want to gather more information about the queue.

Although it works on my system, I'm not certain that it's completely generic. I'm assuming that the queue device name for an LTA queue will be "serial/LTAxxxx" - the quoting of symbol dev is also a bit odd because I was too lazy to strip the double quotes from the device name. If your queue devices names have a different pattern, you'll need to modify the test to suit.
A crucible of informative mistakes
John Gillings
Honored Contributor

Re: Determining "SPOOLED" Device

Oops, just noticed you said:

>> (Mike) f$GetQUI("DISPLAY_QUEUE", "DEVICE_NAME", "actual_queue_name")
>
>The lexical you suggest returns the
>queue's printer's DNS name and port
>number, and not the spooled device I'm
>looking for.

On my system it returns, for example, "serial/LTA9999" (including the quotes).

Output from QUISPL.COM is:

Queue CSC$3500 => LTA9999 spooled to _DSA110:
Queue CSC$5100 => LTA9997 spooled to _DSA110:
Queue CSC$LN17PS => LTA9995 spooled to _DSA110:
Queue CSCU$3500 => LTA9998 spooled to _DSA100:
Queue OCCPR1 => LTA9994 spooled to _DSA110:
Queue OCCPR2 => LTA9996 spooled to _DSA110:

So now I'm curious about your queues. Are they really LAT devices?

Our startup procedure creates the queues with:

$ MCR LATCP CREATE PORT LTA9994
$ MCR LATCP SET PORT LTA9994/NODE=server/PORT=port

The queues are then created using DCPS with a P2 value of "auto=(node1,node2)::LTA9994:"

On another system, the LTA based queues have device names looking like "node::LTAnnn:", and F$GETQUI DEVICE_NAME returns just the LTA device name.

So, I've added a test to see if the device name returned by F$GETQUI exists, and assume it might be spooled. No doubt there are numerous other permutations that I don't know about (including the one on your system?). It's almost certainly possible to do what you want, but it may need some fiddling to work out the queue to LTA device mapping.
A crucible of informative mistakes
Wim Van den Wyngaert
Honored Contributor

Re: Determining "SPOOLED" Device

I searched for the same question (find devivce to which an lta is spooled) in 2004 and found no answer. So, now I simply do set dev /nospool for all spooled lta device (during shutdown, to avoid shadow merges).

VMS isn't perfect : there are sometimes set commands without corresponding show commands (other example is set audit/listener).

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: Determining "SPOOLED" Device

I sure look silly now with the answer of John.

I mixed it up with another question : how to find the files that are open on a disk when they are not returned by show dev/fi. I didn't get a solution because
1) I'm unable to install the latest shadowing software
2) VMS has no way of showing the files

So, I get shadow merges each time I reboot.

Wim
Wim