INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

How to detect whether a tape has been loaded

How to detect whether a tape has been loaded

(OP)
Does anybody know if there is an easy way to detect whether a tape has been loaded onto a device?  We are using MOUNT/FOREIGN TAPE:.  If there is no tape loaded, the operation hangs indefinately until we cancel the job.  In an ideal world we would like to report and email an error message.
Thanks,
Kath Bright

RE: How to detect whether a tape has been loaded

Are you doing an "ALLOCATE TAPE:" 1st?

Try checking "$SEVERITY" after the "ALLOCATE TAPE:" command.

Such as:
  $ IF $SEVERITY .NES. "1" THEN GOTO HANDLE_ERROR

   The integer values for each DCL severity level are:

   Value           Severity

   0               Warning
   1               Success
   2               Error
   3               Information
   4               Severe (fatal) error
------------------------------------------------------

Try the "SHOW SYMBOL $SEVERITY" to see the current value
of it.

Thanks, Glen

RE: How to detect whether a tape has been loaded

(OP)
Sound great in theory.  Can't get it to work though.  $severity always shows as 1 after the allocate, regardless of the state of the tape.  is this dependent on VMS versions or anything else similar?

RE: How to detect whether a tape has been loaded


What version of VAX/VMS or OpenVMS are you on?
Processor & tape drive model?

RE: How to detect whether a tape has been loaded

(OP)
OpenVMS v7.1
Processor : Microvax 3100/98
Tape drive : TLZ09
Thanks Glen.

RE: How to detect whether a tape has been loaded

Instead of checking after the "ALLOCATE", check it after the "MOUNT/FOR". The "ALLOCATE" always returns a "1", sorry.

However, back to the original problem of the system hanging on the "MOUNT/FOR":
1). Check the tape sysgen timeout parameter:
$ MCR SYSGEN SHOW TAPE_MVTIMEOUT (should be 600 seconds)
2). Try a "MOUNT/NOASSIST/FOR..."
---------------------------------------------------
I have tested it on our Microvax 3100 running
OpenVMS 6.2 (ok it's old...), here are the results:

$ ALLOCATE $TAPE1
%DCL-I-ALLOC, _KIRBY$MKB700: allocated
$ SHOW SYM $SEVERITY
  $SEVERITY == "1"
$ MOUNT/FOR $TAPE1 ABACKUP
%MOUNT-F-VOLINV, volume is not software enabled
$ SHOW SYM $SEVERITY
  $SEVERITY == "4"

RE: How to detect whether a tape has been loaded

Did you get your tape problem solved?

Just wondered....

Glen

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close