Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Check status of tape drive on OpenVMS

SOLVED
Go to solution
Mike Smith_33
Super Advisor

Check status of tape drive on OpenVMS

Before we spend a lot of time on this one I just wanted to know if anyone has already done this. We support several locations with various people responsible for loading tapes in the tape drives for daily backups. We would like to create a procedure to check the tape drive and tell us something similar to the following.

- Is a tape loaded
- Is the tape write locked
- Is the drive empty

I just did this on my HPUX systems and it was pretty easy to query the tape drive and act based on the return status. At one point we had a program that would mount and then attempt an init but sometimes it caused problems. The HPUX solution was elegant in that it just queried and returned a status.

8 REPLIES
Steven Schweda
Honored Contributor
Solution

Re: Check status of tape drive on OpenVMS

A real program would be nice, but you can
probably scan the output from
SYS$ETC:SCSI_INFO.EXE and find what you need.

For the Exabyte 8505XL on my XP1000 running
VMS V7.3-2:

************
File SYS$SYSROOT:[SYSMGR]TAPE_NO.OUT;1
76 $! Medium Type ................. 00h
******
File SYS$SYSROOT:[SYSMGR]TAPE_YES.OUT;1
76 $! Medium Type ................. 85h
************

************
File SYS$SYSROOT:[SYSMGR]TAPE_NO.OUT;1
118 $! End-Of-Medium ..................... False
******
File SYS$SYSROOT:[SYSMGR]TAPE_YES.OUT;1
118 $! End-Of-Medium ..................... True
************

************
File SYS$SYSROOT:[SYSMGR]TAPE_YES.OUT;1
77 $! Device-Specific Parameter ... 10h
******
File SYS$SYSROOT:[SYSMGR]TAPE_WP.OUT;1
77 $! Device-Specific Parameter ... 90h
************

Unless you're on a VAX, or some VMS version
without SYS$ETC:SCSI_INFO.EXE, or it's not a
SCSI tape drive, or some other reason, of
course. (Or did I miss something in your
apparently INCOMPLETE inquiry?)

And what was the HP-UX solution?
Daniel Fernandez Illan
Trusted Contributor

Re: Check status of tape drive on OpenVMS

Hi
Another solution is to make a DCL command file using F$DEVICE and F$GETDVI lexicals.

Saludos.
Daniel.
Joseph Huber_1
Honored Contributor

Re: Check status of tape drive on OpenVMS

Another way, which is independent of interface, is to use IO$_PACKACK function on the device:
if it returns success, then a medium is loaded, and You can procede to mount.
When mounted f$getdvi can be used to check wether it is write protected.

A more-or-less ready to use packack program is my
http://wwwvms.mppmu.mpg.de/~huber/util/main/packack.for

Example:
MPIW10_HUB>set proc/priv=(oper,sysprv,phy_io)
MPIW10_HUB>packack MPIW12$MKB500:
PACKACK status= 420 Hex 1A4 #bytes= 66752
IO$_packack failed forMPIW12$MKB500:
%SYSTEM-F-MEDOFL, medium is offline
http://www.mpp.mpg.de/~huber
Robert Atkinson
Respected Contributor

Re: Check status of tape drive on OpenVMS

Mike, you might also want to check our Media Robot Utility (http://h10025.www1.hp.com/ewfrf/wc/genericDocument?cc=us&docname=c00331297&lc=en&jumpid=reg_R1002_USEN).

I can't say for certain, but this may be able to act as an interface to SCSI query commands.

Rob.
Robert Atkinson
Respected Contributor

Re: Check status of tape drive on OpenVMS

E.g.

ROBOT

SHOW

PORT


The SHOW PORT command displays information about a port. The output
includes the type of port and one of these possible states:

o Full or -- The port contains a cartridge. The bar code
value of the cartridge occupying the port appears if the media
robot is capable of reading cartridge bar codes.

o Empty -- The port contains no cartridge and is available for
use.

o Unavailable -- The port is unavailable for use.
Mike Smith_33
Super Advisor

Re: Check status of tape drive on OpenVMS

Only one set of drives has a loader although for that one I think Robert made a good point. I will assign points to the others once I review some of the programs provided and the documentation pointed out. We are running Alphaservers which I neglected to mention. We have varying versions of OpenVMS but all are at least 7.3.

I thank you all for you responses and will respond back after further review.
Mike Smith_33
Super Advisor

Re: Check status of tape drive on OpenVMS

Daniel, thanks for the response but please add more detail for better scoring.

Steven, attached is the hpux script

Mike Smith_33
Super Advisor

Re: Check status of tape drive on OpenVMS

Based on the responses, I am able to check the status and notify appropriately. Thanks everyone for your replies.