- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Determining "SPOOLED" Device
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 06:01 AM
тАО08-07-2006 06:01 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 08:11 AM
тАО08-07-2006 08:11 AM
Re: Determining "SPOOLED" Device
f$GetQUI("DISPLAY_QUEUE", "DEVICE_NAME", "actual_queue_name")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 08:48 AM
тАО08-07-2006 08:48 AM
Re: Determining "SPOOLED" Device
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 09:37 AM
тАО08-07-2006 09:37 AM
Re: Determining "SPOOLED" Device
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 09:46 AM
тАО08-07-2006 09:46 AM
Re: Determining "SPOOLED" Device
http://vmsone.com/~decuslib/vaxsig/vax92b/alpha/hints/spooldev.code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 10:32 AM
тАО08-07-2006 10:32 AM
Re: Determining "SPOOLED" Device
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 10:40 AM
тАО08-07-2006 10:40 AM
Re: Determining "SPOOLED" Device
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 11:05 AM
тАО08-07-2006 11:05 AM
Re: Determining "SPOOLED" Device
>> (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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 05:57 PM
тАО08-07-2006 05:57 PM
Re: Determining "SPOOLED" Device
VMS isn't perfect : there are sometimes set commands without corresponding show commands (other example is set audit/listener).
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 08:28 PM
тАО08-07-2006 08:28 PM
Re: Determining "SPOOLED" Device
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2006 03:26 AM
тАО08-08-2006 03:26 AM
Re: Determining "SPOOLED" Device
I'm not interested in the spooled device (that info can be easily gotten), what I'm trying to find is what *que name" the device is spooled to, ie, in the cmd
$ SET DEV LTAxxx: /SPOOLED=(que-name, disk)
I'm trying to get the que-name when I know the dev name (LTA in this case).
I've looked at the $GETDVI system service docs and don't see anything there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2006 04:34 AM
тАО08-08-2006 04:34 AM
Re: Determining "SPOOLED" Device
the program refered to by David's entry does what you want.
And there's always SDA:
$ sho dev lta1
Device Device Error
Name Status Count
LTA1: Online spooled 0
$ ANAL/SYS
SDA> READ SYSDEF
SDA> SHOW DEV LTA1:
...
SDA> exa @(ucb+ucb$l_vcb)+vcb$b_status+1;10
FFFFFFFF 809217E4 54534554 041101C0 ├Г ...TEST├Г┬д....... 83082508
00A54258 90EC3719 00000000 00058268 h........7├Г┬м.XB├В┬е. 83082518
The queue name starts at offset VCB$B_STATUS+1 and the length of the string is stored at VCB$B_STATUS, so in this case, the queue name is TEST.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2006 05:02 AM
тАО08-08-2006 05:02 AM
Re: Determining "SPOOLED" Device
Thanks for pointing me to the macro routine - I originally thought it just returned the spooled device.
1) The macro routine assembles w/o error,
but when linking I get "undefined symbol IOC$VERIFYCHAN". What do I need to add to my LINK statement?
2) I'd rather use your ANA/SYS cmds.
- can that be scripted?
- looks like the que name starts on a word boundary, but how would I programmatically tell how long the que name is?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2006 05:35 AM
тАО08-08-2006 05:35 AM
Solutionthe GETSPL.MAR example program is privileged code and needs to be linked against the OpenVMS executive:
$ LINK/SYSEXE GETSPL.OBJ
As this program contains kernel mode code ($CMKRNL_S), it could crash your system.
$ link/sysexe getspl
$ run getspl
Device: lta1:
TEST
DSA3
I would suggest to add the following line:
.entry getspl_k,^m
moval g^lib$sig_to_ret,(FP) ; prevent crash in case of error
The length of the queue name is stored in the byte at VCB$B_STATUS
SDA> def size= @(@(ucb+ucb$l_vcb)+vcb$b_status)&ff
SDA> eva size
Hex = 00000000.00000004 Decimal = 4
This could be scripted. You can send the SDA output to a file by using SDA> SET LOG file, but I would think the GETSPL program is the better way.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2006 05:44 AM
тАО08-08-2006 05:44 AM
Re: Determining "SPOOLED" Device
Thanks much.
My management won't allow me to install the privileged code macro, so I will be scripting the SDA solution. Since I will be starting with the que name, I'm going to have to look through all of the LTA devices for a match, so I'll see how efficient I can make the DCL code. And I see that SDA throws a warning if there is no associated spooled que.