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

UNLOAD tape drive after INIT

SOLVED
Go to solution
ChaimBu
Frequent Advisor

UNLOAD tape drive after INIT

I have to INIT some 100 tapes, and I would like to have to avoid manually unloading the tape after each INIT command.

How can I do this?

Thanks,

Chaim
9 REPLIES
John Abbott_2
Esteemed Contributor

Re: UNLOAD tape drive after INIT

Hi, you could;

$ mount/for drive:
$ dismount/unload drive:

If you are using a media libary and have mru installed you can use the $robot commands to physically load & unload the tapes too !

Failing that, perhaps a $inquire and a loop back to give you time to physically take out and load the next tape (and of course check that the current one didn't fail it init!!)

Regards
John.
Don't do what Donny Dont does
Karl Rohwedder
Honored Contributor

Re: UNLOAD tape drive after INIT

What about the old-fashioned SET MAGTAPE/UNLOAD?

regards kalle
Ian Miller.
Honored Contributor
Solution

Re: UNLOAD tape drive after INIT

MOUNT/FOR, DISMOUNT/UNLOAD appear to be the simplest.

SET MAGTAPE needs the tape to be mounted.

$ set mag/unload $1$mkb500:
%SET-E-NOTSET, error modifying $1$MKB500:
-SYSTEM-F-DEVNOTMOUNT, device is not mounted
____________________
Purely Personal Opinion
Wim Van den Wyngaert
Honored Contributor

Re: UNLOAD tape drive after INIT

Or use backup/rewind to init the tape.

Wim
Wim
ChaimBu
Frequent Advisor

Re: UNLOAD tape drive after INIT

Actually the mount/dismount solution works quite well!

Would using BACKUP take longer or shorter or not significant?

Thanks,

Chaim
Wim Van den Wyngaert
Honored Contributor

Re: UNLOAD tape drive after INIT

Now :
init
mount/for
dism/unl

To be :
backup/rew login.com dev:sav/sav/rewind/dens=xxx (or whatever options you need)
dism/unl

Faster ? Could be.

Wim
Wim
ChaimBu
Frequent Advisor

Re: UNLOAD tape drive after INIT

I don't want to actually backup any files! I am preparing these tapes to be scratch tapes for future backups!

Thanks,

Chaim
John Abbott_2
Esteemed Contributor

Re: UNLOAD tape drive after INIT

Just incase you have a media library and MRU installed... here's a snip of code we've used for years, amended so as to not be site specific.. I hope!

$ ROBOT LOAD SLOT physical_slot DRIVE usually_0_or_1 ROBOT media_library(e.g. GKG0)
$ WAIT 00:01:30 ! mechanical load
$ INIT device: label
$ ROBOT UNLOAD DRIVE 0_or_1 SLOT returning_slot_from_load ROBOG media_library

You'll notice there's no mount/dismount commands as the ROBOT commands load/unload the media, and there's only the need to pay a visit to load/unload your media library :-) how lazy !

J.
Don't do what Donny Dont does
ChaimBu
Frequent Advisor

Re: UNLOAD tape drive after INIT

The bets and most elegant solution appears to to use the mount/dismount commands.

Works like a charm!

Thanks to all,

Chaim