home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!dog.ee.lbl.gov!ucbvax!NSCVAX.PRINCETON.EDU!dragon
- From: dragon@NSCVAX.PRINCETON.EDU (Mighty Firebreather)
- Newsgroups: comp.os.vms
- Subject: RE: GETDVIW question
- Message-ID: <0095DE63.34336600.6483@nscvax.princeton.edu>
- Date: 21 Jul 92 13:48:38 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: The Internet
- Lines: 41
-
-
- Marc Zampetti
- <elroy.jpl.nasa.gov!sdd.hp.com!mips!darwin.sura.net!jvnc.net!netnews.upenn.edu!eniac.seas.upenn.edu!zampetti@ames.arc.nasa.gov>
- writes:
- >
- >
- >I am currently writing an application using VAX C. This application
- >is a user front end for and Tape management. This program will handle all
- >of the commn tape functions, like mounting and copying files, so that
- >the users don't have to know a great deal about tapes. One of the things
- >that I need to do is check to see if one of the four tape drives is
- >online and available. I am using the SYS$GETDRVIW System Service Routine to
- >check to see that the drive is NOT allocated, and thus capable of being
- >used. My problem is that the VAX that this will be running on is actually
- >a VAXCluster, consiting of two nodes. According to the Documentation and
- >my own testing, if a drive is allocated to a user on another node, GETDVIW
- >is unable to determine whether or not the drive has been allocated. I have
- >tried all kinds of permutaions of item codes in the hopes that I can
- >get some kind of return info that I can use to figure out if the drive is
- >free or not. Does anyone know how I can achieve this goal? Any help would
- >be appreciated. I would prefer to use System Service Routines and not have
- >to go through DCL in order to achieve this, but if there is no alternative,
- >then I will go that route.
- >
-
- It seems to me that this is precisely what the $ALLOCATE system
- service is designed for. If the drive is available, it is reserved for
- your use. If it is not available, you get a return status that says so.
- Further, the operation is atomic. If you use $GETDVI to determine the
- availability of a drive, someone could allocate that drive ten milliseconds
- later and then what use is the information from $GETDVI?
-
-
- *************************************************************************
- * *
- * Here, there be dragons! *
- * dragon@nscvax.princeton.edu *
- * *
- * Richard B. Gilbert *
- *************************************************************************
-
-