- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- How does spooling work on OpenVMS?
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
тАО09-10-2004 09:23 AM
тАО09-10-2004 09:23 AM
I know that when I spool the LTA23: device I can ANALYSIS/SYSTEM and do a SHOW DEVICE LTA23: that there is now a AMB block defined with the address of the UCB for the disk the device is spooled to.
I know that if I have multiple nodes in a cluster and I create the LTA23: device on all the nodes that the queue symbiont only has one allocated at a time. I can actually do a SET DEVICE/NOSPOOL LTA23: on the nodes that symbiont is not running.
I recently learned that you can have one device spooled and point to a queue that is a generic queue such that you may not actually end up printing on that device at all. If you think about it if you have LTA23: created on all nodes and the symbiont is only attached to it on one then all nodes can open LTA23: write data and get it queued up to the queue and printed.
So what I want to know is:
1) How does the spooled device know the difference between a program opening the LTA23 device to write to it and therefore to be spooled to a file and when the symbiont opens the device and actually needs to write out to the printer attached to it?
2) Why when you spool a device does it open a connection to the spooled disk. why not just when you need to actually open a file? The reason I ask this if that if you spool to a disks that is not the system disk and the disk is a shadow disk with Host Base Volume Shadowing (HBVS) that you can't get a clean dismount on the disk when you shutdown a node that it always goes into shadow merge.
So would it be possible to not have the LTA devices that are spooled to a disk keep that disk from being dismounted cleanly.
Anyway this got me thinking and inquiring minds want to know. So if you know the answer or can point me to where it is please do so. I tried looking in the internals but could not find anything.
Thanks
Cass
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2004 07:49 PM
тАО09-10-2004 07:49 PM
Solutionyou set up device spooling with:
$ SET DEVICE dev:/SPOOLED=(queue-name,intermediate-disk-name)
dev: must be a sequential terminal or printer device.
Spooling is implemented in the File System (XQP). You can find some information about spooling in the VMS File System Internals book (ISBN 1-55558-056-4).
This answers question 1: if the device is spooled, the virtual file system function IO$_CREATE honors the spool characteristics of the spooled device (e.g. LTAn:) and creates an intermediate spool file (no direcotry entry !) on the associated 'spool device' (i.e. intermediate disk name) pointed to by UCB$L_AMB.
Once the spooled device (LTAn:) is de-accessed, the XQP automatically sends the spool file from the intermediate device to the associated print-queue (just like a PRINT/DELETE).
You need to use XQP functions ($OPEN) when writing to the spooled device (terminal/printer), logical QIOs won't work. Normally your application will be implicitly using RMS (like $ COPY file LTAn:).
The Print-Symbiont will be using $ASSIGN and IO$_WRITELBLK and - as it it sufficently privileged - directly write to the LTAn: device. The print-symbiont itself has NOTHING to do with spooling, he is just processing a print-job. So there is no need at all for LTAn: devices to be set spooled, except if your applications need this functionality (writing to a terminal/printer device, which needs to be shared and handled by a print-symbiont).
There is no implicit association between the LTAn: device and the print-queue. You can spool device LTA1: to a print-queue, which will run on LPA7: - if you want to. And it can also be a generic queue, as you've found out.
When a device is spooled (to an intermediate-disk-device), a counter is incremented in the VCB (Volume Control Block) for that device (VCB$L_SPL_CNT), which counts the no. of devices spooled to that volume. You cannot dismount that volume, if VCB$L_SPL_CNT is greater than zero. You'll get an appropriate error message from DISMOUNT:
%DISM-W-SPOOLEDEV, 1 device spooled to volume
To cleanly dismount your shadowset during shutdown, you need to UNSPOOL ($ SET DEV/NOSPOOLED LTAn:) all your LTAn: devices in SYSHUTDWN.COM, which have been spooled to that volume. This will also be true for a non-shadowed disk, but you'll just get a REBUILD during mount instead of a SHADOW-MERGE, which is more visible.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2004 07:56 PM
тАО09-10-2004 07:56 PM
Re: How does spooling work on OpenVMS?
just by pure coincidence, I had just written a command procedure for one of my customers to find spooled devices, which prevent a clean dismount during shutdown.
$ DEFINE fsp_tmp "SYS$LOGIN:fsp_''F$GETJPI("","PID")'.TMP" ! temp file
$ fsp_tmp1 = "SYS$LOGIN:fsp1_''F$GETJPI("","PID")'.TMP" ! another temp file
$!
$ ANAL/SYS
SET OUT/NOINDEX fsp_tmp
SHOW DEV LTA
$!
$! intermediate disk UCB address is in AMB
$ SEARCH fsp_tmp AMB,UCB: /OUT='fsp_tmp1'
$ DELETE/NOLOG/NOCONFIRM 'F$TRNLNM("fsp_tmp")';*
$!
$ WRITE SYS$OUTPUT "The following LTA devices are still spooled to a disk:"
$ WRITE SYS$OUTPUT ""
$ SEARCH 'fsp_tmp1' AMB/WIND=(1,0)/NOHEAD
$ DELETE/NOLOG/NOCONF 'fsp_tmp1';*
This should be treated as an example on how to locate spooled devices in an OpenVMS system.
As always, you need to reverse things set up in SYSTARTUP_VMS.COM during SYSHUTDWN.COM, so you need to find your SET DEV/SPOOLED commands and add the appropriate SET DEV/NOSPOOLED commands during shutdown. The above procedure could also be enhanced to do this automatically - left as an excercise for the forum readers ;-)
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2004 08:26 PM
тАО09-10-2004 08:26 PM
Re: How does spooling work on OpenVMS?
as Volker pointed out, there is no direct connection between a SPOOLed device and a print queue - other than ytat normally after closing the spool device a print job is triggered.
For the last 20 years I have considered the use of issuing print lines to a device from inside an image as a relic of the past. A much more convinient way is to educate the programmers, and do the writing to FILE, and some time after print the file.
If there are no programs that OPEN the device directly in the executable, there is no need for spooling, and also no need to SET the device SPOOLed.
Some 15 years ago I began removing any SET DEVICE /SPOOL I found, and I only found ONE programm that used it... and on pointing out to the development department that I liked that changed, I got a --HAPPY-- reaction, because that explained the issues they were having with it, and now they were easy to solve!!
So: if you MUST, then it is working (probabably, no recent experience), but if you can, GET RID OF THEM!!
hth
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2004 10:53 PM
тАО09-10-2004 10:53 PM
Re: How does spooling work on OpenVMS?
When I talk to customers I often learn that they do it, because they see it in examples, not because they really need spooled devices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 01:42 AM
тАО09-11-2004 01:42 AM
Re: How does spooling work on OpenVMS?
People use spooled devices only to avoid broadcasts to their printers. It is much better to avoid this with a set terminal/nobroadcast. Programs which write directly to the printer are rare (probably they come from a non VMS environment).
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 04:42 AM
тАО09-11-2004 04:42 AM
Re: How does spooling work on OpenVMS?
And I have seen software sending its output to spooled devices that heavily uses FMS + RDB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 07:44 PM
тАО09-11-2004 07:44 PM
Re: How does spooling work on OpenVMS?
For each lta device they have a logical 1,2,3,4,... . The programs simply open 1 and writes to it. The application counts many millions of cryptic DSM lines that nobode really knows. Changing this application and retesting it would take months. So, nothing changes.
1 elements that I found missing in the spooling : show device/spool.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 09:36 PM
тАО09-11-2004 09:36 PM
Re: How does spooling work on OpenVMS?
I agree it is possible not use spooled devices. I don't never know the syntax of spool!
Like Henry Ford said, any thing didn't used can't break!
Bojan, I'm amazed some people use spooled devices to acoid SET TERM/NOBROAD :-O
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 03:31 AM
тАО09-12-2004 03:31 AM
Re: How does spooling work on OpenVMS?
yes, your argument is valid.
And, when confronted with them, I also found it very annoying that is was not possible to see which devices were spooled to a certain disk.
I guess you should send a friendly request to Guy Peleg at HP.
He _IS_ looking forward to DCL improvement requests, especially those that have real practical value.
I guess this might qualify!
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 08:01 PM
тАО09-12-2004 08:01 PM
Re: How does spooling work on OpenVMS?
I dont know what side effects will be (I could not test) but if you do a:
$ mcr latcp stop node
then all the lta devices are deleted. Maybe this line in the SYSHUTDWN.COM will avoid merging.
Another way to find spooled lt devices:
$ pipe show device lt | search sys$pipe spooled
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 08:20 PM
тАО09-12-2004 08:20 PM
Re: How does spooling work on OpenVMS?
don't work F$GETDEVI(
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 08:36 PM
тАО09-12-2004 08:36 PM
Re: How does spooling work on OpenVMS?
Indeed mc latcp stop node deletes all lta devices but I do this for years in the shutdown and I still get the shadow merge. I don't have files open, no spool files (?). I don't know how to find what is causing it.
It would be nice to have some debug logicals/dismount option that causes mounts to say why it will mark the shadow set as "needs merge". HP ?
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 08:38 PM
тАО09-12-2004 08:38 PM
Re: How does spooling work on OpenVMS?
Yes it works, but how to find out all the existing lt devices?
There is a supplement to my previous command, wich sets all the spooled lts to nospooled (of course after stoping all queues). Write a litle command procedure setnospool.com:
$l:
$ read sys$pipe devst/end=end/error=end
$ set device/nospool -
'f$edit(f$element(0," ", devst) , "collapse")'
$ goto l
$end:
Now run the previous pipe:
$ pipe show device lt | search sys$pipe spooled | @setnospool
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 09:08 PM
тАО09-12-2004 09:08 PM
Re: How does spooling work on OpenVMS?
MC LATCP> SET NODE does NOT solve the problem. It seems to delete the LAT devices, but the VCB$L_SPL_CNT of the spool disk is NOT decremented !
$ SHOW TERM LTAn: shows (as the last line of the display):
...
Device spooled to _DSA0:
F$GETDVI("LTAn","SPLDEVNAM") also shows the spool disk name.
There does not seem to exist a command, which would tell you, WHICH devices are spooled to a specific disk volume.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 10:02 PM
тАО09-12-2004 10:02 PM
Re: How does spooling work on OpenVMS?
can be answered by a device-scan loop like the following:
$ stream = 1
$loop:
$ DEVICE_NAME = F$DEVICE(,"TERM",,stream)
$ if device_name .eqs. "" then goto done
$ devnam = f$getdvi(DEVICE_NAME,"DEVNAM")
$ if f$extract(1,2,devnam) .eqs. "LT"
$ then
$ write sys$output "LT device ",devnam
$ endif
$ goto loop
$done:
$ exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2004 12:10 AM
тАО09-13-2004 12:10 AM
Re: How does spooling work on OpenVMS?
I forgot the existance of f$device :(
So combining yours and Volkers knowledge there is a command procedure which finds all the spooled devices to a disk:
$ if p1.eqs."" then read sys$command p1 /prompt="Device: "/end=end
$ nam=f$getdvi(p1,"DEVLOCKNAM")
$l:
$ dev=f$device()
$ if dev.eqs."" then goto end
$ if f$getdvi(dev,"SPL")
$ then
$ if nam.eqs.f$getdvi(f$getdvi(dev,"SPLDEVNAM"),"DEVLOCKNAM")
$ then
$ write sys$output dev
$ endif
$ endif
$ goto l
$end:
For the SYSHUTDWN.COM can be simplified, because we dont need to know on which disk the device is spooled.
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2004 12:12 AM
тАО09-13-2004 12:12 AM
Re: How does spooling work on OpenVMS?
great fun with currently installed number of printers being 812.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2004 01:23 AM
тАО09-13-2004 01:23 AM
Re: How does spooling work on OpenVMS?
$ stream = 1
$loop:
$ DEVICE_NAME = F$DEVICE("*LTA*",,,stream)
$ if device_name .eqs. "" then goto done
$ devnam = f$getdvi(DEVICE_NAME,"DEVNAM")
$ write sys$output "LT device ",devnam
$ goto loop
$done:
$ exit
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2004 11:03 AM
тАО09-20-2004 11:03 AM
Re: How does spooling work on OpenVMS?
Cass